Feature Requests: Browse | Submit New | Admin

[#28591] run and sudo to take multiple arguments

Date:
2010-09-22 12:15
Priority:
3
Submitted By:
Brian Candler (bcandler)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
run and sudo to take multiple arguments

Detailed description
The pattern

  run [ .. ].join(" && ")

is so widely used that perhaps it should be subsumed into rake-remote_task, i.e.

  def run(*commands)
    command = commands.join(" && ")
    ...
  end

It would also be useful if sudo could take multiple commands this way. It would have to expand to

  sudo foo && sudo bar   # not: sudo foo && bar

It could be desirable to have

  sudo sh -c 'foo && bar'

but that introduces problems with quoting. Maybe it could be done as

  sudo sh <<EOF
  foo && bar
  EOF

as long as that doesn't introduce problems with prompting for sudo password.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item