Opened 17 years ago

Closed 16 years ago

Last modified 15 years ago

#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)

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.

comment:2 Changed 17 years ago by jmroot (Joshua Root)

Component: portsbase
Milestone: MacPorts base enhancements
Summary: 'port install BAD' returns 0 error code'port install BAD' should return non-0 error code
Type: defectenhancement
Version: 1.6.01.7.0

This is a base issue, and also applies to trunk.

comment:3 Changed 16 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

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:5 Changed 16 years ago by blb@…

Resolution: duplicate
Status: newclosed

Dup of #13918.

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future
Note: See TracTickets for help on using tickets.