-
-
Notifications
You must be signed in to change notification settings - Fork 763
Description
Description
I use task on both Linux and Windows. So far, I am mostly successful with cross-platform commands by installing https://github.com/uutils/coreutils and making shim scripts like rm.cmd, cp.cmd, mkdir.cmd. However, this doesn't work in Task for internal commands such as mkdir. Task seems to pass the command directly to Command Prompt, which calls the interal mkdir command instead of mkdir.cmd or mkdir.exe.
So it would be nice to have a way to specify I always want to look for the executable in PATH instead of using the platform's builtin. So for the task below, it will find mkdir in PATH then pass the full path of the executable to the shell
tasks:
build:
cmds:
- mkdir -p fooIdeally this doesn't need to be specified in every task or Taskfile - so something like an environment variable TASK_FORCE_EXECUTABLE=1 or some kind of persistent config would be nice
I also remember this used to work in the past, but I couldn't find anything in the change log that's related, so I think it's probably a Windows update that broke it :(. My workaround right now is $(which mkdir) -p foo - which executes my which.exe to get the full path.