Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/amplify-cli/src/init-steps/preInitSetup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { $TSContext, AmplifyError, getPackageManager, LocalEnvInfo, pathManager } from '@aws-amplify/amplify-cli-core';
import { execSync } from 'child_process';
import { execFileSync, execSync } from 'child_process';
import * as fs from 'fs-extra';
import * as url from 'url';
import { generateLocalEnvInfoFile } from './s9-onSuccess';
Expand Down Expand Up @@ -83,7 +83,7 @@ function validateGithubRepo(repoUrl: string | boolean): asserts repoUrl is strin
}
url.parse(repoUrl);

execSync(`git ls-remote ${repoUrl}`, { stdio: 'ignore' });
execFileSync('git', ['ls-remote', repoUrl], { stdio: 'ignore' });
} catch (e) {
throw new AmplifyError(
'ProjectInitError',
Expand All @@ -110,7 +110,7 @@ const cloneRepo = async (repoUrl: string): Promise<void> => {
}

try {
execSync(`git clone ${repoUrl} .`, { stdio: 'inherit' });
execFileSync('git', ['clone', repoUrl, '.'], { stdio: 'inherit' });
} catch (e) {
throw new AmplifyError(
'ProjectInitError',
Expand Down
Loading