Skip to content

Commit 1c625aa

Browse files
authored
Merge pull request #20381 from colindean/patch-1
diagnostic: Use pushd/popd in uncommited modifications nudge
2 parents a729c53 + f081229 commit 1c625aa

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-
cd #{path} && git stash -u && git clean -d -f
706+
git -C "#{path}" stash -u && git -C "${path}" clean -d -f
707707
EOS
708708

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

0 commit comments

Comments
 (0)