Description
I used the following Taskfile.yml:
version: "3"
tasks:
example:
cmd: mktemp -d
Upon running task example, I see the following on Windows 11:
π [ 11:36:51 AM ] β― task example
task: [example] mktemp -d
task: Failed to run task "example": GetFileAttributesEx /tmp: The system cannot find the file specified.
Furthermore, when executing mktemp --help via the same task, I see:
Usage: mktemp [options] [template]
-d Make a directory (shorthand)
-directory
Make a directory
-dry-run
Do everything save the actual create
-p string
Tmp directory to use. If this is not set, TMPDIR is used, else /tmp (shorthand)
-prefix string
add a prefix
-q Quiet: show no errors (shorthand)
-quiet
Quiet: show no errors
-s string
add a prefix (shorthand, 's' is for compatibility with GNU mktemp
-suffix string
add a suffix to the prefix (rather than the end of the mktemp file)
-tmpdir string
Tmp directory to use. If this is not set, TMPDIR is used, else /tmp
-u Do everything save the actual create (shorthand)
task: Failed to run task "example": flag: help requested
I expected two differences:
- The appropriate temp directory on Windows should have been used by default (exposed via the
$TEMP env var)
- The help should have shown
-- before each option instead of a single - which doesn't work correctly
I worked around this as follows:
mktemp --tmpdir "$TEMP" -d
Version
3.46.3
Operating system
Windows 11 Pro
Experiments Enabled
No response
Example Taskfile
version: "3"
tasks:
example:
cmd: mktemp -d
Description
I used the following Taskfile.yml:
Upon running
task example, I see the following on Windows 11:Furthermore, when executing
mktemp --helpvia the same task, I see:I expected two differences:
$TEMPenv var)--before each option instead of a single-which doesn't work correctlyI worked around this as follows:
mktemp --tmpdir "$TEMP" -dVersion
3.46.3
Operating system
Windows 11 Pro
Experiments Enabled
No response
Example Taskfile