Skip to content

Commit

Permalink
fix sudo command. bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
pstadler committed Oct 6, 2015
1 parent c0aea95 commit 76d1aef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,10 +459,10 @@ will be executed is "root". This can be changed by passing
`user: "name"` with the second argument:

```javascript
// will run: sudo -u root -i 'Hello world'
// will run: sudo -u root -i bash -c 'Hello world'
transport.sudo('echo Hello world');

// will run sudo -u www -i 'Hello world'
// will run sudo -u www -i bash -c 'Hello world'
transport.sudo('echo Hello world', {user: 'www'});

// further options passed (see `exec()`)
Expand Down
6 changes: 3 additions & 3 deletions lib/transport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ Transport.prototype.exec = function(command, options) {
* `user: "name"` with the second argument:
*
* ```javascript
* // will run: sudo -u root -i 'Hello world'
* // will run: sudo -u root -i bash -c 'Hello world'
* transport.sudo('echo Hello world');
*
* // will run sudo -u www -i 'Hello world'
* // will run sudo -u www -i bash -c 'Hello world'
* transport.sudo('echo Hello world', {user: 'www'});
*
* // further options passed (see `exec()`)
Expand Down Expand Up @@ -186,7 +186,7 @@ Transport.prototype.sudo = function(command, options) {

command = format('%s%s', this._execWith, command);
command = escapeSingleQuotes(command);
command = format("sudo -u %s -i '%s'", user, command);
command = format("sudo -u %s -i bash -c '%s'", user, command);

return this._exec(command, options);
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flightplan",
"description": "Library for streamlining application deployment or systems administration tasks",
"version": "0.6.5",
"version": "0.6.6",
"author": "Patrick Stadler <patrick.stadler@gmail.com>",
"keywords": [
"deploy",
Expand Down

0 comments on commit 76d1aef

Please sign in to comment.