[MacPorts] #34221: sw_vers hangs during a build

MacPorts noreply at macports.org
Sun Oct 21 06:55:04 PDT 2012


#34221: sw_vers hangs during a build
--------------------------------+--------------------------
  Reporter:  richard.t.lloyd@…  |      Owner:  jeremyhu@…
      Type:  defect             |     Status:  assigned
  Priority:  Normal             |  Milestone:
 Component:  ports              |    Version:  2.0.4
Resolution:                     |   Keywords:  mountainlion
      Port:  gettext            |
--------------------------------+--------------------------

Comment (by kevin@…):

 as far as I can tell this seems to be related to the execution of shell
 commands without quotes EG:

 /bin/sh -c "echo $(sw_vers -productVersion)" | sed -E 's/(10.[0-9]).*/\1/'
 produces an output of 10.8

 and
 /bin/sh -c echo $(sw_vers -productVersion) | sed -E 's/(10.[0-9]).*/\1/'
 results in no output. this is because the sh command seems to be not
 behaving according to it's description - normally the args following the
 -c are supposed to be passed to the called program but that's not what is
 happening here. the -c requires its command to be quoted.

-- 
Ticket URL: <https://trac.macports.org/ticket/34221#comment:47>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list