Errors when a Tupfile contains with spaces in output directory name
I see that Tup is supposed to be able to deal with spaces in input filenames, but when I use a space in an output directory name it seems to give me errors:
: foreach resources/*.* |> cp "%f" "%o" |> "output dir/%b"
tup error: Unable to create output file 'output' because it is already owned by command 38.
The file structure I have that reproduces this issue is:
/Tupfile (containing the line above)
/Tupfile.ini (empty)
/output dir/
/resources/test.txt (just touch the file)
/resources/foo.gif (just touch the file)
Now that #298 is merged, this should be resolved.
Similar issue:
: |> $(DOWNLOAD) |> "in/Livestock - Hierarchy.tsv" "in/Livestock - Names.tsv"
gives me:
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.001s] Reading in new environment variables...
[ tup ] [0.001s] Parsing Tupfiles...
tup error: Unable to insert duplicate tupid 568
- [568] "in/Livestock
* 1) [0.003s] .
tup error: The output file '"in/Livestock' is listed multiple times in a command.
tup error: Error parsing Tupfile line 4
Line was: ': |> $(DOWNLOAD) |> "in/Livestock - Hierarchy.tsv" "in/Livestock - Names.tsv"'
[ ] 100%
*** tup: 1 job failed.
With
DOWNLOAD = touch "in/Livestock - Hierarchy.tsv" "in/Livestock - Names.tsv"
: |> $(DOWNLOAD) |> "in/Livestock - Hierarchy.tsv" "in/Livestock - Names.tsv"
tup gives me
[ tup ] [0.000s] Scanning filesystem...
[ tup ] [0.001s] Reading in new environment variables...
[ tup ] [0.001s] Parsing Tupfiles...
1) [0.002s] .
[ ] 100%
[ tup ] [0.006s] No files to delete.
[ tup ] [0.006s] Generating .gitignore files...
[ tup ] [0.006s] Executing Commands...
1) [0.003s] touch "in/Livestock - Hierarchy.tsv" "in/Livestock - Names.tsv"
[ ] 100%
[ tup ] [0.010s] Updated.
Are you running the git version?
@tharvik ah, no. I think I'm on 0.7.5. Good to know, thank you!
I guess we can close it now, it should be working.
Yes, this can probably be closed. I would give you a verification, but I am not currently using tup on any projects. I will give it another spin some time and will reopen if I see this problem again.