File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 7
7
ROOT_TEST_BRANCH_PREFIX ,
8
8
log ,
9
9
} from "./env" ;
10
- import { exec } from "child_process" ;
10
+ import { execFile } from "child_process" ;
11
11
import { getOctokit } from "@actions/github" ;
12
12
import { commitChangesFromRepo } from "../../git" ;
13
13
import { getRefTreeQuery } from "../../github/graphql/queries" ;
@@ -163,8 +163,9 @@ describe("git", () => {
163
163
164
164
// Clone the git repo locally using the git cli and child-process
165
165
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" ] ,
168
169
{ cwd : testDir } ,
169
170
( error ) => {
170
171
if ( error ) {
@@ -218,8 +219,9 @@ describe("git", () => {
218
219
219
220
// Clone the git repo locally usig the git cli and child-process
220
221
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" ] ,
223
225
{ cwd : testDir } ,
224
226
( error ) => {
225
227
if ( error ) {
You can’t perform that action at this time.
0 commit comments