Skip to content

Commit

Permalink
Merge pull request #25 from danielt998/patch-2
Browse files Browse the repository at this point in the history
Add escaping to ampersand
  • Loading branch information
rnorth authored Feb 5, 2024
2 parents 1118721 + 59b7f13 commit 92842fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [[ "${PLUGIN_CMD:-}" == "" ]]; then
fi
# If multiple cmd lines have been provided, chain them into something which we can execute with sh
# Note that Drone provides these lines in comma separated form without escaping, which means commas in commands are known to break
export PLUGIN_CMD=${PLUGIN_CMD//,/ && }
export PLUGIN_CMD=${PLUGIN_CMD//,/ \&\& }

# Wrap command scriptlet in an invocation of sh
export PLUGIN_CMD="sh -c '${PLUGIN_CMD}'"
Expand Down

0 comments on commit 92842fa

Please sign in to comment.