Skip to content

Commit

Permalink
Fix failure without a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
canac committed Mar 20, 2024
1 parent 98c0f9b commit e2ae201
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/shells/init.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__portman_sync_env() {
unset PORT PORTMAN_PROJECT PORTMAN_LINKED_PORT
lines=$(command portman get --extended 2> /dev/null)
lines=$(command portman get --extended 2> /dev/null || true)
if [[ -n "$lines" ]]; then
PORT=$(echo "$lines" | awk 'NR==1')
PORTMAN_PROJECT=$(echo "$lines" | awk 'NR==2')
Expand Down
2 changes: 1 addition & 1 deletion src/shells/init.zsh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__portman_sync_env() {
unset PORT PORTMAN_PROJECT PORTMAN_LINKED_PORT
lines=$(command portman get --extended 2> /dev/null)
lines=$(command portman get --extended 2> /dev/null || true)
if [[ -n "$lines" ]]; then
PORT=$(echo "$lines" | awk 'NR==1')
PORTMAN_PROJECT=$(echo "$lines" | awk 'NR==2')
Expand Down

0 comments on commit e2ae201

Please sign in to comment.