diff --git a/wt b/wt index 766b613..df8abc0 100755 --- a/wt +++ b/wt @@ -17,7 +17,9 @@ arg=$(echo "${args[0]}" | sed 's/\//\\\//g') # show worktree list worktree_list() { - git worktree list + if git rev-parse --git-dir &> /dev/null; then + git worktree list + fi } help_message() {