tup icon indicating copy to clipboard operation
tup copied to clipboard

Errors when a Tupfile contains with spaces in output directory name

Open kavika13 opened this issue 9 years ago • 6 comments

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)

kavika13 avatar Aug 08 '16 23:08 kavika13

Now that #298 is merged, this should be resolved.

tharvik avatar Oct 19 '16 17:10 tharvik

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.

makmanalp avatar Jun 13 '17 20:06 makmanalp

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 avatar Jun 14 '17 12:06 tharvik

@tharvik ah, no. I think I'm on 0.7.5. Good to know, thank you!

makmanalp avatar Jun 14 '17 18:06 makmanalp

I guess we can close it now, it should be working.

tharvik avatar Jun 22 '17 21:06 tharvik

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.

kavika13 avatar Jun 29 '17 02:06 kavika13