diagnostic: Use pushd/popd in uncommited modifications nudge
While filing https://github.com/Homebrew/brew/issues/20379, I lost where I was because I followed the given instruction. Instead, let's use pushd/popd so the user is returned to their pwd if the git operations succeed.
This commit is contained in:
parent
a729c533fd
commit
7d285c0956
@ -703,7 +703,7 @@ module Homebrew
|
||||
If this is a surprise to you, then you should stash these modifications.
|
||||
Stashing returns Homebrew to a pristine state but can be undone
|
||||
should you later need to do so for some reason.
|
||||
cd #{path} && git stash -u && git clean -d -f
|
||||
pushd #{path} && git stash -u && git clean -d -f && popd
|
||||
EOS
|
||||
|
||||
modified = status.split("\n")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user