Skip to content

Commit

Permalink
Use --depth 1 to make dotfiles install process faster (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
ai authored May 17, 2024
1 parent be1f203 commit 099d347
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spec-common/dotfiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function installDotfiles(params: ResolverParameters, properties: Co
await shellServer.exec(`# Clone & install dotfiles via '${installCommand}'
${createFileCommand(markerFile)} || (echo dotfiles marker found && exit 1) || exit 0
command -v git >/dev/null 2>&1 || (echo git not found && exit 1) || exit 0
[ -e ${targetPath} ] || ${allEnv}git clone ${repository} ${targetPath} || exit $?
[ -e ${targetPath} ] || ${allEnv}git clone --depth 1 ${repository} ${targetPath} || exit $?
echo Setting current directory to '${targetPath}'
cd ${targetPath}
Expand Down Expand Up @@ -74,7 +74,7 @@ fi
await shellServer.exec(`# Clone & install dotfiles
${createFileCommand(markerFile)} || (echo dotfiles marker found && exit 1) || exit 0
command -v git >/dev/null 2>&1 || (echo git not found && exit 1) || exit 0
[ -e ${targetPath} ] || ${allEnv}git clone ${repository} ${targetPath} || exit $?
[ -e ${targetPath} ] || ${allEnv}git clone --depth 1 ${repository} ${targetPath} || exit $?
echo Setting current directory to ${targetPath}
cd ${targetPath}
for f in ${installCommands.join(' ')}
Expand Down

0 comments on commit 099d347

Please sign in to comment.