Skip to content

Commit

Permalink
Use regular string join instead of shjoin for exec command.
Browse files Browse the repository at this point in the history
  • Loading branch information
fschulze committed Feb 7, 2024
1 parent 62dafdb commit c0fea68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def cmd_exec(self, argv, help):
instance = instances[args.instance[0]]
executor = InstanceExecutor(instance)
(rc, out, err) = executor(
*args.remainder, stdout=sys.stdout, stderr=sys.stderr)
*args.remainder, stdout=sys.stdout, stderr=sys.stderr, use_shjoin=False)
sys.exit(rc)

def cmd_ssh(self, argv, help):
Expand Down
4 changes: 2 additions & 2 deletions ploy/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ def __init__(self, instance, **kw):
BaseExecutor.__init__(self, **kw)
self.instance = instance

def _run(self, args, stdin, stdout=None, stderr=None):
cmd = shjoin(args)
def _run(self, args, stdin, stdout=None, stderr=None, use_shjoin=True):
cmd = shjoin(args) if use_shjoin else ' '.join(args)
log.debug('Executing on instance %s:\n%s', self.instance.uid, cmd)
chan = self.instance.conn.get_transport().open_session()
if stdin is not None:
Expand Down

0 comments on commit c0fea68

Please sign in to comment.