feat(create-medusa-app): improve by adding depth to clone commands (#10812)
Improve command by passing `--depth 1` to decrease download size + improve for slow speed. Closes TRI-742
This commit is contained in:
@@ -23,7 +23,7 @@ export default async function cloneRepo({
|
||||
}: CloneRepoOptions) {
|
||||
await execute(
|
||||
[
|
||||
`git clone ${repoUrl || DEFAULT_REPO} -b ${BRANCH} ${directoryName}`,
|
||||
`git clone ${repoUrl || DEFAULT_REPO} -b ${BRANCH} ${directoryName} --depth 1`,
|
||||
{
|
||||
signal: abortController?.signal,
|
||||
},
|
||||
|
||||
@@ -45,7 +45,6 @@ const execute = async (
|
||||
childProcess.signal &&
|
||||
["SIGINT", "SIGTERM"].includes(childProcess.signal)
|
||||
) {
|
||||
console.log("abortingggg")
|
||||
throw getAbortError()
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,9 @@ export async function installNextjsStarter({
|
||||
}
|
||||
|
||||
try {
|
||||
// TODO change back to use create-next-app once Next.js v2 changes land on the main branch
|
||||
await execute(
|
||||
[
|
||||
`git clone ${NEXTJS_REPO} -b ${NEXTJS_BRANCH} ${nextjsDirectory}`,
|
||||
`git clone ${NEXTJS_REPO} -b ${NEXTJS_BRANCH} ${nextjsDirectory} --depth 1`,
|
||||
{
|
||||
signal: abortController?.signal,
|
||||
env: process.env,
|
||||
|
||||
Reference in New Issue
Block a user