Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wtadd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ function _worktree {
warn "Unable to run git pull, there may not be an upstream"
fi

# if there was an envrc file, tell direnv that it's ok to run it
if [ -f "$parent_dir/$dirname/.envrc" ]; then
# if there was an envrc file, tell direnv -- if it's installed -- that it's ok to run it
if [ type -t direnv 2>/dev/null && -f "$parent_dir/$dirname/.envrc" ]; then
direnv allow "$parent_dir/$dirname"
fi

Expand All @@ -192,4 +192,4 @@ while true; do
esac
done

_worktree "$@"
_worktree "$@"