coastal-science / call-catalog-viewer

https://orca.research.sfu.ca/catalogue
Other
1 stars 0 forks source link

When commit messages contains mismatch of " and special characters ( or ), then the manual_deploy part of on push fails #7

Open VWJF opened 2 years ago

VWJF commented 2 years ago

Same as Issue 4 of srkw-call-catalogue-files

I suspect it is because the payload sends commit messages, and some messages contain characters ", ( and ), ' which are being echoed without escaping in the manual deployment action


The issue does not occur with

VWJF commented 2 years ago

In the earlier step, the output variable is set with

echo "::set-output name=packageJson::$content"

This echo was removed one level of the escaping of symbols \' became '

Instead, use jq to achieve URL encoding https://stackoverflow.com/a/34407620

content=`cat $GITHUB_EVENT_PATH` | jq -sRr @uri