Bubble up failures in dotfiles installation

Currently, if the dotfiles installation (`coder dotfiles ...`) fails, the script still shows as successful in the Coder UI.
pull/387/head
Charles Augello 3 months ago committed by GitHub
parent c8a42f6202
commit c95843df8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save