Need help with Portfile

Behrang Saeedzadeh behrangsa at gmail.com
Tue Dec 9 04:11:44 PST 2014


Hi,

As part of a Portfile I am writing, I need to install a Ruby gem, so I have
added this build block:

build {
   system "${prefix}/bin/gem-1.8 install CFPropertyList"
}


This fails, because without root privileges, the gem cannot be installed.
However if I change the build block to use sudo:

build {
   system "sudo ${prefix}/bin/gem-1.8 install CFPropertyList"
}

It also fails, but this time with this error message:

:info:build sh: /usr/bin/sudo: Operation not permitted


What's the proper way of invoking such commands that need root level
permissions?


Best regards,
Behrang
http://www.behrang.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20141209/d16bcb57/attachment.html>


More information about the macports-users mailing list