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

Sub-scripts use first script's directory #1

Open
pikakid98 opened this issue May 9, 2024 · 1 comment
Open

Sub-scripts use first script's directory #1

pikakid98 opened this issue May 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pikakid98
Copy link
Owner

When trying to run the compiler from in a sub-script.. Example, you're compiling one program which calls to another .compile file from within.. Doing this causes a weird issue where it'll try to use the first compile file's directory.. Which is unintended

@pikakid98 pikakid98 added the bug Something isn't working label May 14, 2024
@pikakid98
Copy link
Owner Author

pikakid98 commented Jul 6, 2024

Use this as a workaround for now

View the code
PUSHD "%CD%"
  
cd "{PATH}"
mkdir ".Cmpl8r"
mkdir "Output"
copy ".compile" ".Cmpl8r"
ren ".Cmpl8r\.compile" "[CompileTemp].bat"
call ".Cmpl8r\[CompileTemp].bat"
rmdir ".Cmpl8r" /S /Q
  
POPD
  
robocopy "{PATH}\Output" "Output" /MIR
  
rmdir "{PATH}\Output" /S /Q

Make sure to replace {PATH} with the actual path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant