Replies: 1 comment 1 reply
-
I think you have the wrong approach. You want to use normal commands, and have Task automate those. So, for instance (if using LInux bash shell): vars:
BUILD_DIR: "build"
CGO_ENABLED: "0"
REPORTS_DIR: "reports"
tasks:
create-directory-structure:
cmds:
- rm -r "{{ .BUILD_DIR }}"
- mkdir -p "{{joinPath .BUILD_DIR .REPORTS_DIR }}"
silent: true You can add |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to write a simple task to create a subdirectory structure and remove certain locations:
This fails with
template: :1:29: executing "" at <.BUILD_DIR>: invalid value; expected string
. My understanding is thatBUILD_DIR
is indeed astring
.Anyway, I went ahead and used
{{kindOf .BUILD_DIR}}
...and the output isstring
🤷♂️Is this a bug in Task or am I doing something that's not valid somehow?
Beta Was this translation helpful? Give feedback.
All reactions