K
Kless
Is possible to call to sudo before of run a ruby statement (for that
can be run that statement)?
can be run that statement)?
So, is not possible anything as: ?Hi Kless.
I think you're talking about passing commands through the 'system' command.
How about something like this:
system("sudo rm -rf /path/to/directory")
Kless said:So, is not possible anything as: ?
system("sudo")
FileUtils.mkdir_p(dir_root) unless File.exist?(dir_root)
Kless said:system("sudo mkdir -p #{dir_root}")
First, puts a string that advises the user why they might need to enter
their password.
But shouldn't you be using a high-level installer for Java itself?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.