1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-10-16 06:17:34 +00:00

Add error handling to dotfish

This commit is contained in:
Steffo 2021-07-15 02:32:00 +02:00
parent f239e2ecea
commit 0f18d2899d
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -4,11 +4,20 @@ function dotfish
else
set -g TARGET (whoami)
end
set -g FISHCONFIG ~(echo $TARGET)/.config/fish
echo_progress "Updating fish config for: "
echo_highlight "$TARGET" \n
if test -z $TARGET
echo_progress "Invalid target, exiting with 1"
exit 1
end
set -g FISHCONFIG ~(echo $TARGET)/.config/fish
echo_progress "Destination directory is: "
echo_highlight "$FISHCONFIG" \n
if test -d $FISHCONFIG
echo_progress "Pulling from Git..." \n
git -C $FISHCONFIG pull