-
-
Notifications
You must be signed in to change notification settings - Fork 774
Open
Labels
dep: u-root/u-rootIssues related to the upstream core utils used by Task.Issues related to the upstream core utils used by Task.
Description
Description
I used the following Taskfile.yml:
version: "3"
tasks:
example:
cmd: mktemp -dUpon 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
$TEMPenv 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 -dMetadata
Metadata
Assignees
Labels
dep: u-root/u-rootIssues related to the upstream core utils used by Task.Issues related to the upstream core utils used by Task.