Skip to content

Commit

Permalink
Update git-actions.ts (#72)
Browse files Browse the repository at this point in the history
* Update git-actions.ts

Double quotation marks have been added to solve the problem that occurs when the branch name contains parenthesis or apostrophe.

* Added double quotation marks. Ran the command 'npm run build'

---------

Co-authored-by: walterbarreiro10k <[email protected]>
  • Loading branch information
walter-barreiro and walterbarreiro10k authored Jan 13, 2024
1 parent 517644f commit e990546
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/git-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function getDiffInPullRequest(
* called from within action. Writing to file, then reading avoids this error.
*/
execSync(
`git diff destination/${baseRef}...origin/${headRef} > ${DIFF_OUTPUT}`
`git diff "destination/${baseRef}"..."origin/${headRef}" > ${DIFF_OUTPUT}`
);
const files = parse(fs.readFileSync(DIFF_OUTPUT).toString());
const filePathToChangedLines = new Map<string, Set<number>>();
Expand Down

0 comments on commit e990546

Please sign in to comment.