Skip to content

Commit 60ce25b

Browse files
authored
Use git's -C option to set git's working directory for uncommitted modifications nudge
1 parent 7d285c0 commit 60ce25b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/diagnostic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def check_git_status
703703
If this is a surprise to you, then you should stash these modifications.
704704
Stashing returns Homebrew to a pristine state but can be undone
705705
should you later need to do so for some reason.
706-
pushd #{path} && git stash -u && git clean -d -f && popd
706+
git stash -u -C #{path} && git clean -d -f -C #{path}
707707
EOS
708708

709709
modified = status.split("\n")

0 commit comments

Comments
 (0)