You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 foo
Ideally 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.
The text was updated successfully, but these errors were encountered:
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 likerm.cmd
,cp.cmd
,mkdir.cmd
. However, this doesn't work in Task for internal commands such asmkdir
. Task seems to pass the command directly to Command Prompt, which calls the interal mkdir command instead ofmkdir.cmd
ormkdir.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
inPATH
then pass the full path of the executable to the shellIdeally 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 niceI 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 mywhich.exe
to get the full path.The text was updated successfully, but these errors were encountered: