Skip to content

fix(dotfiles): handle failures in dotfiles installation #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 4, 2025
3 changes: 3 additions & 0 deletions dotfiles/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ if [ -n "$${DOTFILES_URI// }" ]; then
DOTFILES_USER_HOME=$(eval echo ~"$DOTFILES_USER")
sudo -u "$DOTFILES_USER" sh -c "'$CODER_BIN' dotfiles '$DOTFILES_URI' -y 2>&1 | tee '$DOTFILES_USER_HOME'/.dotfiles.log"
fi
if [ $? -ne 0 ]; then
echo "Failed to install dotfiles"
exit 1
fi
Loading