Description
Hi.
Since Task gained the built-in Coreutils implementations, I've been encountering a consistent failure with Cp. I'm not entirely convinced it's an issue directly in u-root code (or how I'd even test it) so I'm reporting it here.
The problem seems to be that the check for "target ... is not a directory" is not using the same working directory as the rest. If I do the test below but first create ROOT\subsubdir manually to pass the check, Cp continues and actually copies the files into ROOT\subdir\subsubdir correctly.
> task test
task: [test] pwd
ROOT\subdir
task: [test] rm -rf subsubdir/
task: [test] mkdir subsubdir/
task: [test] touch file1 file2
task: [test] ls
ROOT\subdir\file1
ROOT\subdir\file2
ROOT\subdir\subsubdir
task: [test] cp file1 file2 subsubdir/
task: Failed to run task "test": coreutils: target "subsubdir/" is not a directory
Version
3.50.0
Operating system
Windows
Experiments Enabled
none
Example Taskfile
version: "3"
tasks:
test:
dir: subdir
cmds:
- pwd
- rm -rf subsubdir/
- mkdir subsubdir/
- touch file1 file2
- ls
- cp file1 file2 subsubdir/
Description
Hi.
Since Task gained the built-in Coreutils implementations, I've been encountering a consistent failure with Cp. I'm not entirely convinced it's an issue directly in u-root code (or how I'd even test it) so I'm reporting it here.
The problem seems to be that the check for "target ... is not a directory" is not using the same working directory as the rest. If I do the test below but first create ROOT\subsubdir manually to pass the check, Cp continues and actually copies the files into ROOT\subdir\subsubdir correctly.
Version
3.50.0
Operating system
Windows
Experiments Enabled
none
Example Taskfile