unkmas Posted August 15, 2018 Share Posted August 15, 2018 Hey there. I'm developing worflow, that will run pre-built script in current terminal. "Run command: is not suitable, cause I need to get all of the output to current terminal, so I'm using "Terminal command" action. The problem is I can't find any way to get the path of worflow folder to run that script. Is it possible? Link to comment
deanishe Posted August 15, 2018 Share Posted August 15, 2018 (edited) 2 hours ago, unkmas said: The problem is I can't find any way to get the path of worflow folder to run that script. Is it possible? The workflow folder is the working directory when your workflow script is run, so pwd. Edited August 15, 2018 by deanishe Link to comment
unkmas Posted August 15, 2018 Author Share Posted August 15, 2018 3 hours ago, deanishe said: The workflow folder is the working directory when your workflow script is run, so pwd. No, working directory - is current directory of terminal for "Terminal command" action. It is workflow folder only for "Run command" action. Link to comment
vitor Posted August 15, 2018 Share Posted August 15, 2018 Before the Terminal Command, add a Run Script with echo -n "${PWD}" (pwd will print a new line, and echo -n won’t). You can then access the Workflow’s directory in the Terminal Command with {query}. unkmas 1 Link to comment
unkmas Posted August 16, 2018 Author Share Posted August 16, 2018 13 hours ago, vitor said: Before the Terminal Command, add a Run Script with echo -n "${PWD}" (pwd will print a new line, and echo -n won’t). You can then access the Workflow’s directory in the Terminal Command with {query}. Yeah, that's brilliant, thanks! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now