Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fail a little more gracefully if Narwhal can't be executed in sea/act…

…ivate.
  • Loading branch information...
commit d0cad69cbf3e1bc31f3fc6bbbb056d2abb90b69d 1 parent d2b2ab9
Tom Robinson authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 bin/activate.bash
View
8 bin/activate.bash
@@ -45,6 +45,12 @@ if [ -f "$PACKAGE_HOME"/narwhal.conf ]; then
fi
if [ "$NARWHAL" ]; then
- export PATH="$("$NARWHAL" --package "$PACKAGE_HOME" --path :)"
+ # try to get the PATH for Narwhal packages. Print a warning if it fails.
+ PATH_NEW="$("$NARWHAL" --package "$PACKAGE_HOME" --path :)"
+ if [ "$?" -ne 0 ]; then
+ echo "Warning: Unable to setup PATH for Narwhal." 1>&2
+ else
+ export PATH="$PATH_NEW"
+ fi
fi
Please sign in to comment.
Something went wrong with that request. Please try again.