GaloisInc / saw-script

The SAW scripting language.
BSD 3-Clause "New" or "Revised" License
437 stars 63 forks source link

build.sh tries to copy git output text #2103

Closed sauclovian-g closed 1 month ago

sauclovian-g commented 1 month ago

Under some circumstances running build.sh will compile and then do this:

cp: HEAD: No such file or directory
cp: is: No such file or directory
cp: now: No such file or directory
cp: at: No such file or directory
cp: 70963e0: No such file or directory
cp: Merge: No such file or directory
cp: pull: No such file or directory
cp: request: No such file or directory
cp: #10: No such file or directory
cp: from: No such file or directory
cp: RyanGlScott/ghc-9.8: No such file or directory

which turns out to be because, after a rebuild that involves submodule changes, cabal list-bin runs git submodule init itself and then prints the output, and the script captures it thinking it's part of the name of the executable.

arguably this is a cabal problem (there is no reason that list-bin should do anything but print the requested info) but the immediate workaround is to use -v0 with cabal list-bin.

RyanGlScott commented 1 month ago

I just fixed a similar problem in the cabal-collect-bins CI action (which SAW's CI uses).