Skip to content

Commit

Permalink
Fix unsafe evaluation of inputs.use-sudo (#124)
Browse files Browse the repository at this point in the history
The previous code was (presumably mistakenly) running inputs.use-sudo as
a command, which worked assuming it was true or false (as they ignore
their arguments), but this results in the action executing the value of
inputs.use-sudo as a command.

Signed-off-by: Hal Blackburn <[email protected]>
  • Loading branch information
h4l authored May 16, 2023
1 parent 46b5db7 commit 03d0fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ runs:
esac
SUDO=
if "${{ inputs.use-sudo }}" == "true" && command -v sudo >/dev/null; then
if [[ "${{ inputs.use-sudo }}" == "true" ]] && command -v sudo >/dev/null; then
SUDO=sudo
fi
Expand Down

0 comments on commit 03d0fec

Please sign in to comment.