- Task version: master(installed via go)
- OS: windows
- Example Taskfile:
version: '2'
env:
CONFIG: Debug
print:
cmds:
- echo $CONFIG
For Mac, I could pass environment variables like this CONFIG=Debug task print,
but for windows, I have to do $env:CONFIG='Debug'; task print; Remove-Item Env:\CONFIG in powershell, because task print CONFIG=Release will just parse that as vars rather than env.
I'm wondering if it is possible to provide a way to pass env variable directly in one command like
task print $CONFIG=Debug VAR=test, for which
- variable name start with a
$ will be recognized as env
- otherwise, treated as
vars like current
Or any other ideas? Open for discussion.
For Mac, I could pass environment variables like this
CONFIG=Debug task print,but for windows, I have to do
$env:CONFIG='Debug'; task print; Remove-Item Env:\CONFIGin powershell, becausetask print CONFIG=Releasewill just parse that asvarsrather thanenv.I'm wondering if it is possible to provide a way to pass env variable directly in one command like
task print $CONFIG=Debug VAR=test, for which$will be recognized as envvarslike currentOr any other ideas? Open for discussion.