#14928 closed enhancement (duplicate)
'port install BAD' should return non-0 error code
Reported by: | bulk@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 1.7.0 |
Keywords: | Cc: | vinc17@… | |
Port: |
Description
Hi,
Is this the correct behavior for macports 1.6.0? I would have guessed a non-0 error code.
$ port install BAD Error: Port BAD not found $ echo $? 0
This makes scripting and testing for errors difficult.
thanks,
--nickg
Change History (6)
comment:1 Changed 17 years ago by raimue (Rainer Müller)
comment:2 Changed 17 years ago by jmroot (Joshua Root)
Component: | ports → base |
---|---|
Milestone: | → MacPorts base enhancements |
Summary: | 'port install BAD' returns 0 error code → 'port install BAD' should return non-0 error code |
Type: | defect → enhancement |
Version: | 1.6.0 → 1.7.0 |
This is a base issue, and also applies to trunk.
comment:4 Changed 16 years ago by vinc17@…
And if other port names are provided on the command line, these ports should not be installed, because BAD could be some syntax error and port cannot know which variant the user intended to install.
comment:6 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future |
---|
Note: See
TracTickets for help on using
tickets.
Use the -x flag. port will break at the first error and return the expected non-zero error code.
But I agree that this could be improved.