-
assigned issue to
Installer reports success after failing
Here are last two lines of output when I ran ./install $HOME/upcxx-inst
where $HOME/upcxx-inst
already contains an installation:
./install: line 109: /Users/phargrov/upcxx-inst/bin/upcxx-meta: cannot overwrite existing file
UPC++ successfully installed
The failure on line 109 is apparently due to noclobber=1
in my ~/.bashrc
.
So the installer could overcome this particular case by setting noclobber=0
.
However, I think the important issue here is that the script is not checking for failure of some or all of the commands it runs.
So, set -e
near the very beginning of the install script is probably appropriate.
This was reproduced from master
and thus corresponds to the 2017.9.0 release.
Comments (4)
-
reporter -
reporter - changed status to resolved
install: improve error handling & avoidance
This commit resolves issue
#82by making two changes:-
Replace '>' with '>|' when creating the top-level upcxx-meta, in order to make the behavior of the script independent of the shell's noclobber setting.
-
Add "trap failure_and_die ERR" to ensure that any failing shell commands (full pipelines) will result in the "Please report ..." message. This is actaully a bit more friendly than the simpler 'set -e' I had suggested in the issue tracker.
As a result of the second change, it is likely we could remove a few instances of calls directly to 'failure_and_die'. However, without the ability to test each one carefully, I have not undertaken to do so.
→ <<cset 2800995885cc>>
-
- changed milestone to 2017.12.31 release
-
- changed version to 2017.9.0 release
- Log in to comment
Self-assigning since I know how to fix and am best situated to test.