garden icon indicating copy to clipboard operation
garden copied to clipboard

Custom exec commands are executed in the current directory

Open eysi09 opened this issue 4 years ago • 1 comments

Bug

Current Behavior

I have a custom command that runs a local script, something like:

# In <project-root>/custom-commands.garden.yml
kind: Command
name: my-command
exec:
  command: [./scripts/my-script.sh]

If I run it in from the project root the command works as expected.

If I run it from a child dir, I get:

Command exited with code undefined

I'm assuming we're not exec-ing the script from the location of the custom-commands.garden.yml file.

Also, I would expect a better error.

I'm on latest master.

eysi09 avatar Mar 08 '22 14:03 eysi09

@eysi09 should we always consider the project root as a cwd when we run the commands?

vvagaytsev avatar Jun 30 '22 09:06 vvagaytsev

Closing as a duplicate of #3151.

vvagaytsev avatar Nov 23 '22 14:11 vvagaytsev