Skip to content

Is it possible to execute a command in the directory just has been invoked in? #1360

Answered by casey
koehlma asked this question in Q&A
Discussion options

You must be logged in to vote

Good question!

You could do this:

foo:
  cd {{invocation_directory()}} && bar

So just foo would run bar in the invocation directory

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@koehlma
Comment options

@casey
Comment options

@davised
Comment options

@casey
Comment options

Answer selected by koehlma
Comment options

You must be logged in to vote
1 reply
@mahiki
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants