diff --git a/src/lepos.bash b/src/lepos.bash index 067d2d0..506a78f 100644 --- a/src/lepos.bash +++ b/src/lepos.bash @@ -5,6 +5,13 @@ function lepos { else local path path=$(lepol "$@") + status=$? + if [[ $status -ne 0 ]]; then + echo "lepol failed with status $status" + echo $path + return $status + fi + if [[ $path != "" ]]; then echo "Change directory to $path" \cd "$path"