Open RothAndrew opened 4 months ago
IMO paths should always be relative to the source file directory. So, in the example above the correct value for envPath should be ../.env
and both uds run hello
and uds run bar:hello
as well as cd subdir && uds run -f bar.yaml hello
should all act the same
Similar issues will be found in actions.dir
and actions.cmd
I suppose remote includes would need to be a special case, in that they would need to use paths relative to the file path where the tasks.yaml file is
Workaround:
# subdir/bar.yaml
tasks:
- name: hello
actions:
- cmd: |
set -a; source .env; set +a
echo "$KENOBI"
Note for github actions runners, for some reason sh
doesn't have source
so you'll get an error source: not found
. Do this instead:
tasks:
- name: hello
actions:
- cmd: |
set -a; source .env; set +a
echo "$KENOBI"
shell:
darwin: bash
linux: bash
Environment
App version: UDS CLI v0.13.0
Steps to reproduce
tasks:
KENOBI="Hello There!"
Given the above, if I run
uds run bar:hello
I correctly get"Hello There!"
. If I runuds run hello
I don't.If I change envPath to
.env
thenuds run hello
works fine anduds run bar:hello
throws: