Skip to content

Commit 099d347

Browse files
authored
Use --depth 1 to make dotfiles install process faster (#830)
1 parent be1f203 commit 099d347

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/spec-common/dotfiles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function installDotfiles(params: ResolverParameters, properties: Co
4343
await shellServer.exec(`# Clone & install dotfiles via '${installCommand}'
4444
${createFileCommand(markerFile)} || (echo dotfiles marker found && exit 1) || exit 0
4545
command -v git >/dev/null 2>&1 || (echo git not found && exit 1) || exit 0
46-
[ -e ${targetPath} ] || ${allEnv}git clone ${repository} ${targetPath} || exit $?
46+
[ -e ${targetPath} ] || ${allEnv}git clone --depth 1 ${repository} ${targetPath} || exit $?
4747
echo Setting current directory to '${targetPath}'
4848
cd ${targetPath}
4949
@@ -74,7 +74,7 @@ fi
7474
await shellServer.exec(`# Clone & install dotfiles
7575
${createFileCommand(markerFile)} || (echo dotfiles marker found && exit 1) || exit 0
7676
command -v git >/dev/null 2>&1 || (echo git not found && exit 1) || exit 0
77-
[ -e ${targetPath} ] || ${allEnv}git clone ${repository} ${targetPath} || exit $?
77+
[ -e ${targetPath} ] || ${allEnv}git clone --depth 1 ${repository} ${targetPath} || exit $?
7878
echo Setting current directory to ${targetPath}
7979
cd ${targetPath}
8080
for f in ${installCommands.join(' ')}

0 commit comments

Comments
 (0)