Skip to content

Commit

Permalink
fix: Commit messages aren't fully shell escaped
Browse files Browse the repository at this point in the history
`app` , "test", 'foo'

Signed-off-by: Minsu Lee <amond@amond.net>
  • Loading branch information
amondnet committed Jun 27, 2022
1 parent 4e76438 commit d25df76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async function vercelDeploy(ref, commit) {

const providedArgs = vercelArgs.split(/ +/);

const commitMessage = commit.replace("'", "\\'").replace('`', '\\`');
const commitMessage = commit.replace("'", "\\'").replace('`', '`````');

const args = [
...vercelArgs.split(/ +/),
Expand Down
3 changes: 3 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const message = '`foo`, "bar", \'test\'';

console.log(`'${message}'`);

0 comments on commit d25df76

Please sign in to comment.