diff options
| author | Roy Sommer <illBeRoy@users.noreply.github.com> | 2020-03-21 01:11:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-21 01:11:44 +0200 |
| commit | cae9e34aed733cde4cdf9d62dddfe6ee08e564c4 (patch) | |
| tree | aadcb9f0f8d9f45f7db0b134bb80d52032e14b1c /task | |
| parent | Release version 1.2.0 (diff) | |
| download | taskipy2-cae9e34aed733cde4cdf9d62dddfe6ee08e564c4.zip | |
Passed Arguments Are Escaped Properly (#12)
passed arguments are now escaped properly. can pass arguments with spaces.
Diffstat (limited to '')
| -rw-r--r-- | taskipy/run.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/taskipy/run.py b/taskipy/run.py index 88c2ba9..2b7f007 100644 --- a/taskipy/run.py +++ b/taskipy/run.py @@ -2,6 +2,7 @@ import os import subprocess import sys import toml +import shlex from os import path from typing import List @@ -46,7 +47,7 @@ def run_task(task_name: str, args: List[str], cwd=os.curdir): print(f'could not find task "{task_name}""') sys.exit(127) - command_with_passed_args = ' '.join([task] + args) + command_with_passed_args = ' '.join([task] + [shlex.quote(arg) for arg in args]) commands.append(command_with_passed_args) try: |