Reputation: 35318
Other than hard-coding "sudo" into the exec/system argument string, is there a flag in Rake that specifies that a command needs to be executed with root privileges, and will prompt for a password if needed? Like how Babushka has a :sudo => true
option.
Upvotes: 2
Views: 1547
Reputation: 5311
don't know if there's a Rake option for this (but I suppose there isn't). you can easyly do it by checking user's privileges. check this answer:
On Unix, find if user who executed the program is root?
Upvotes: 1