Skip to content

Commit

Permalink
fix error during rename
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentclaes committed Jan 30, 2021
1 parent e51ba48 commit b967dcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion datajob/datajob.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path

import typer
import shlex

from datajob.package import wheel

Expand Down Expand Up @@ -68,4 +69,5 @@ def call_cdk(command: str, args: list = None, extra_args: list = None):
full_command = " ".join(["cdk", command] + args + extra_args)
print(f"cdk command:" f" {full_command}")
# todo - shell=True is not secure
subprocess.call(full_command, shell=True)
# subprocess.call(full_command, shell=True)
subprocess.check_call(shlex.split(full_command))
3 changes: 2 additions & 1 deletion datajob/package/wheel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import subprocess
from pathlib import Path
import shlex

from datajob import logger

Expand All @@ -20,7 +21,7 @@ def create(project_root):
cmd = f"cd {project_root}; python setup.py bdist_wheel"
print(f"wheel command: {cmd}")
# todo - shell=True is not secure
subprocess.call(cmd, shell=True)
subprocess.check_call(shlex.split(cmd))
else:
raise DatajobPackageWheelError(
f"no setup.py file detected in project root {project_root}. "
Expand Down

0 comments on commit b967dcc

Please sign in to comment.