mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #13228 from meteor/fix/git-terminal-windows
Fix how ot set GIT_TERMINAL_PROMPT on windows
This commit is contained in:
@@ -1057,9 +1057,12 @@ main.registerCommand({
|
||||
const setupExampleByURL = async (url) => {
|
||||
const [ok, err] = await bash`git -v`;
|
||||
if (err) throw new Error("git is not installed");
|
||||
const isWindows = process.platform === "win32";
|
||||
// Set GIT_TERMINAL_PROMPT=0 to disable prompting
|
||||
const [okClone, errClone] =
|
||||
await bash`GIT_TERMINAL_PROMPT=0 git clone --progress ${url} ${appPath}`;
|
||||
const gitCommand = isWindows
|
||||
? `set GIT_TERMINAL_PROMPT=0 && git clone --progress ${url} ${appPath}`
|
||||
: `GIT_TERMINAL_PROMPT=0 git clone --progress ${url} ${appPath}`;
|
||||
const [okClone, errClone] = await bash`${gitCommand}`;
|
||||
if (errClone && !errClone.message.includes("Cloning into")) {
|
||||
throw new Error("error cloning skeleton");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user