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

Garbage in PATH env var #927

Closed
Tercete opened this issue Apr 25, 2015 · 1 comment
Closed

Garbage in PATH env var #927

Tercete opened this issue Apr 25, 2015 · 1 comment

Comments

@Tercete
Copy link

Tercete commented Apr 25, 2015

Hi... This is not a bug, but an inconvenient.
When you use this tool many times, it changes the PATH environment variable, appending the actual directory, many times...
To avoid this behavior, I suggest this:

@echo off
if "%PATH_BASE%" == "" set PATH_BASE=%PATH%
set PATH=%CD%;%PATH_BASE%;
java -jar -Duser.language=en "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9

Thanks in advance...

@iBotPeaches
Copy link
Owner

Can you explain what the code you added changes? It looks to see if PATH_BASE is empty, then set it to PATH, but then it just sets PATH to current directory + PATH_BASE. This doesn't seem to fix the problem by looking at the code.

However, when actually testing it. It does fix it. The PATH only gains one iteration of the current directory, thus works. So thanks! I'll get this merged.

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

No branches or pull requests

2 participants