Skip to content

Conversation

mccricri
Copy link
Contributor

@mccricri mccricri commented Sep 13, 2024

Using pushd that takes consideration for the drive in the path, when it is different form where the command is launch.

Reference to #13820

pushd "%~dp0\.."
set RELEASE_ROOT=%cd%
popd
popd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this popd too or can we remove it?

Suggested change
popd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know.
But seemed obvious for me that one pushd - one popd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried a little script :

cd 
pushd "c:\temp"
cd
pushd "d:\src"
cd
popd
cd
popd 

Without the second popd, I'm still in then C:\temp and not restored in the original directory where a launch it.

So I'l say Yes , we need the second too.

@josevalim josevalim merged commit 4bbddcc into elixir-lang:main Sep 13, 2024
8 of 9 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants