Skip to content

Commit

Permalink
Use single quote in exec command to prevent interpolating (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jawang35 authored Mar 29, 2019
1 parent 42d0dce commit ad56931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@

escaped_command = command.replace('"', '\\"')
print(f'Running command "{escaped_command}" on {host}...')
connection.run(f'exec $SHELL -l -c "{escaped_command}"')
connection.run(f'exec $SHELL -l -c \'{escaped_command}\'')

0 comments on commit ad56931

Please sign in to comment.