File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 77 ROOT_TEST_BRANCH_PREFIX ,
88 log ,
99} from "./env" ;
10- import { exec } from "child_process" ;
10+ import { execFile } from "child_process" ;
1111import { getOctokit } from "@actions/github" ;
1212import { commitChangesFromRepo } from "../../git" ;
1313import { getRefTreeQuery } from "../../github/graphql/queries" ;
@@ -163,8 +163,9 @@ describe("git", () => {
163163
164164 // Clone the git repo locally using the git cli and child-process
165165 await new Promise < void > ( ( resolve , reject ) => {
166- const p = exec (
167- `git clone ${ process . cwd ( ) } repo-1` ,
166+ const p = execFile (
167+ "git" ,
168+ [ "clone" , process . cwd ( ) , "repo-1" ] ,
168169 { cwd : testDir } ,
169170 ( error ) => {
170171 if ( error ) {
@@ -218,8 +219,9 @@ describe("git", () => {
218219
219220 // Clone the git repo locally usig the git cli and child-process
220221 await new Promise < void > ( ( resolve , reject ) => {
221- const p = exec (
222- `git clone ${ process . cwd ( ) } repo-2` ,
222+ const p = execFile (
223+ "git" ,
224+ [ "clone" , process . cwd ( ) , "repo-2" ] ,
223225 { cwd : testDir } ,
224226 ( error ) => {
225227 if ( error ) {
You can’t perform that action at this time.
0 commit comments