Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliably resolve parent directory for batch files #11

Closed
wants to merge 1 commit into from

Conversation

staticshock
Copy link

%~dp0 is not reliable. If the batch file invocation is quoted and invoked without a path, %~dp0 is set to $PWD instead of the batch file's parent directory.

Fixes #10

%~dp0 is not reliable. If the batch file invocation is quoted and
invoked without a path, %~dp0 is set to $PWD instead of the batch file's
parent directory.

Fixes npm#10
@ForbesLindesay
Copy link
Contributor

Can you update this pull request so it can be more easily merged?

@isaacs
Copy link
Contributor

isaacs commented Aug 13, 2019

This definitely needs an example use case so I can tell what it's actually doing. If I'm correctly understanding the issue described, the approach in this patch is going to fail as well.

@isaacs isaacs closed this Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invocation fails if %0 is "prog" instead of "path\to\prog" and prog was quoted when invoked
3 participants