From: Simon Ruderich Date: Sun, 3 Jun 2018 16:18:20 +0000 (+0200) Subject: lib.sh: abort if cd fails X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=78be217cf70604a6f241f35cc622a5153198c46a;p=config%2Fdotfiles.git lib.sh: abort if cd fails --- diff --git a/lib.sh b/lib.sh index 1ce0c33..0329a0f 100644 --- a/lib.sh +++ b/lib.sh @@ -168,7 +168,7 @@ link() { ln -s "$source" "$target" # Go back to the directory where we were before. - cd "$pwd" + cd "$pwd" || return 1 } # Generate a file from a source file using a given command. A warning not to