Skip to content

Instantly share code, notes, and snippets.

@eam
Created September 15, 2015 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eam/b5c46ecabc49dcff0170 to your computer and use it in GitHub Desktop.
Save eam/b5c46ecabc49dcff0170 to your computer and use it in GitHub Desktop.
def noshell_exec(cmd)
if cmd.length == 1
Kernel.exec([cmd[0], cmd[0]])
else
Kernel.exec([cmd[0], cmd[0]], *cmd[1..-1])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment