Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit 9706e9c

Browse files
committed
escape single quotes when executing bash from perl
1 parent 1100c54 commit 9706e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/copy-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
github="{\"default_branch\":\"${{ env.DEFAULT_BRANCH }}\"}"
113113
context="{\"config\":$config,\"github\":$github}"
114114
regexp='\$\{\{\{\s*(.*?)\s*\}\}\}'
115-
replacement="\`echo '$context' | jq -jc '.\$1'\`"
115+
replacement="\$filter = \".\$1\"; \$filter =~ s/'/'\"'\"'/g; \`echo '${context//\'/\'\"\'\"\'}' | jq -jc '\$filter'\`"
116116
for f in $(jq -r '.[]' <<< ${{ toJson(env.FILES) }}); do
117117
echo -e "\nProcessing $f."
118118
# add DO NOT EDIT header

0 commit comments

Comments
 (0)