mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 06:44:22 +00:00
Add error handling to dotfish
This commit is contained in:
parent
f239e2ecea
commit
0f18d2899d
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue