Bubble up failures in dotfiles installation
Currently, if the dotfiles installation (`coder dotfiles ...`) fails, the script still shows as successful in the Coder UI.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user