Skip to content

Commit

Permalink
src/winusb: util_call_external_command: Fix ShellCheck detected problems
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁 <[email protected]>
  • Loading branch information
brlin-tw committed Jun 7, 2017
1 parent 23fc347 commit dd0d660
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/winusb
Original file line number Diff line number Diff line change
Expand Up @@ -955,10 +955,10 @@ util_call_external_command(){
fi

if [ "${command_exit_status}" -ne 0 ]; then
echo_with_color red "Error occurred while running command \"${command[@]}\" (exit status: ${command_exit_status})!" >&2
echo_with_color red "Error occurred while running command \"${command[*]}\" (exit status: ${command_exit_status})!" >&2

local -r read_prompt="Read command output (Y/n)?"
printf "${read_prompt}"
printf "%s" "${read_prompt}"

local answer='y'

Expand All @@ -971,12 +971,12 @@ util_call_external_command(){
elif [ "${answer}" == "n" ] || [ "${answer}" == "N" ]; then
break
else
printf "${read_prompt}"
printf "%s" "${read_prompt}"
fi
done

echo_with_color red "Press ENTER to continue" >&2
read -r keyholder; unset keyholder
read -r # catch enter key
fi

return "${command_exit_status}"
Expand Down

0 comments on commit dd0d660

Please sign in to comment.