aboutsummaryrefslogtreecommitdiffstats
path: root/task
diff options
context:
space:
mode:
authorRoy Sommer <illBeRoy@users.noreply.github.com>2020-03-21 01:11:44 +0200
committerGitHub <noreply@github.com>2020-03-21 01:11:44 +0200
commitcae9e34aed733cde4cdf9d62dddfe6ee08e564c4 (patch)
treeaadcb9f0f8d9f45f7db0b134bb80d52032e14b1c /task
parentRelease version 1.2.0 (diff)
downloadtaskipy2-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.py3
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: