Jump to content

[SOLVED] Run attached script in terminal command


Recommended Posts

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
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 by deanishe
Link to comment
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
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
  • vitor changed the title to [SOLVED] Run attached script in terminal command

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...