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

define execute location #32

Closed
antorax opened this issue Sep 6, 2017 · 4 comments
Closed

define execute location #32

antorax opened this issue Sep 6, 2017 · 4 comments

Comments

@antorax
Copy link

antorax commented Sep 6, 2017

I am trying to use this plugin to debug a script that checks moves and deletes files. i have a test dir resembling the operational server. this project is located in a git dir and most paths used in the script are relative paths. this plugin wants to run my script in /home/$USER (this is confirmed by the pwd variable)
i would like to run it in /home/$USER/git/ProjectDir. how can i force this to happen? do i set this in launch.json?

@rogalmic
Copy link
Owner

rogalmic commented Sep 7, 2017

Please try to create second script, that cd's to desired folder, then uses "source" bash builtin to include the original script. Debug that second script.

@antorax
Copy link
Author

antorax commented Sep 7, 2017

what worked best for me was to add a SCRIPT_ROOT variable and then assign all path variables like
PATH="$SCRIPT_ROOT"/path/to/dir that way i can easily change the location everything is run from.

@rogalmic
Copy link
Owner

Added "cwd" parameter to version 0.1.1 - please verify.

@rogalmic
Copy link
Owner

I think this is fixed, please re-open if needed...

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

No branches or pull requests

3 participants