[13 Feb 2010] "sudo" with Execute() in MacOS

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
PEB
Posts: 576
Joined: Sun Feb 21, 2010 1:28 am

[13 Feb 2010] "sudo" with Execute() in MacOS

Post by PEB »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 13 Feb 2010 00:23:49 -0000

I'm trying to get a MacOS Hollywood program to copy a file to a location that requires root access. I was hoping that I could accomplish this by using "sudo" with Execute(), and I thought that this might bring up a password prompt; but this does not seem to work.

This is what I'm doing: Execute("sudo cp -p TestFile \"/Library/Application Support\"")

Am I doing something wrong, or is this just not possible with Hollywood?
User avatar
airsoftsoftwair
Posts: 5833
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[13 Feb 2010] Re: "sudo" with Execute() in MacOS

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 13 Feb 2010 22:54:54 +0100
I'm trying to get a MacOS Hollywood program to copy a file to a location that requires root access. I was hoping that I could accomplish this by using "sudo" with Execute(), and I thought that this might bring up a password prompt; but this does not seem to work.

This is what I'm doing: Execute("sudo cp -p TestFile \"/Library/Application Support\"")

Am I doing something wrong, or is this just not possible with Hollywood?
Hmm, yeah, seems to be a bug as well. Arguments are never passed to the program. I'll fix this :)
Locked