-
-
Notifications
You must be signed in to change notification settings - Fork 144
bug in (extra) output to different directory and %O #150
Copy link
Copy link
Open
Description
If I have a Tupfile like this one:
: |> echo first > %o && echo second > %o.2 |> out/file.txt | %O.txt.2
It fails with following message:
d:\1\tup_dir>tup
[ tup ] [0.001s] Scanning filesystem...
[ tup ] [0.114s] Reading in new environment variables...
[ tup ] [0.114s] Parsing Tupfiles...
1) [0.001s] .
[ ] 100%
[ tup ] [0.117s] Deleting files...
1) rm: out\file.txt.2
[ ] 100%
[ tup ] [0.120s] Generating .gitignore files...
[ tup ] [0.239s] Executing Commands...
* 1) echo first > out/file.txt && echo second > out/file.txt.2
*** tup errors ***
tup error: File 'd:\1\tup_dir\out/file.txt.2' was written to, but is not in .tup
/db. You probably should specify it as an output
-- Delete: d:\1\tup_dir\out/file.txt.2
tup error: Expected to write to file 'out/file.txt.2' from cmd 25 but didn't
*** Command ID=25 ran successfully, but tup failed to save the dependencies.
[ ] 100%
*** tup: 1 job failed.
As you notice tup somehow does not like the output to the file it expects...
This works if the output goes to the same directory:
: |> echo first > %o && echo second > %o.2 |> file.txt | %O.txt.2
It also works if I state the "extra output" explicitly (so if I replace "%O" with "out/file"):
: |> echo first > %o && echo second > %o.2 |> out/file.txt | out/file.txt.2
Interesting fact - %O does not care about preceding it with "out/" - in both cases the output is the same (same error).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels