Skip to content

Conversation

mccricri
Copy link
Contributor

To be able to run batch file from another drive, we must siwtch to the good one before "cd" into a directory.

As explained in #13820

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

Choose a reason for hiding this comment

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

I have been reading the docs and it seems this would also work:

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

Because, opposite to cd, pushd changes the path. can you please give it a try too? ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it works well too.
And it seems little bit cleaner than playing with old "dos" command.

I'll do another pull request

@mccricri mccricri closed this Sep 13, 2024
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