Skip to content

Commit

Permalink
lepos: Handle lepol error
Browse files Browse the repository at this point in the history
lepolでエラー終了したときにcdしないように
  • Loading branch information
Gs-itisitcat committed Mar 10, 2024
1 parent 6e787b1 commit 8dd01a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lepos.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8dd01a7

Please sign in to comment.