Skip to content

Commit

Permalink
delete obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Jul 11, 2020
1 parent 3bfcbf2 commit cfbd29b
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions poethepoet/task/cmd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from glob import glob
import os
from pathlib import Path
import re
import shlex
Expand All @@ -24,8 +23,6 @@ def _handle_run(
env: MutableMapping[str, str],
dry: bool = False,
):
if self.options.get("shell", False):
self._run_shell(extra_args, project_dir, env, dry)
cmd = self._resolve_args(extra_args, env)
self._print_action(" ".join(cmd), dry)
if dry:
Expand All @@ -50,22 +47,6 @@ def _resolve_args(self, extra_args: Iterable[str], env: MutableMapping[str, str]
# Finally add the extra_args from the invoking command and we're done
return result

def _run_shell(
self,
extra_args: Iterable[str],
project_dir: Path,
env: MutableMapping[str, str],
dry: bool = False,
):
# TODO: look into making this more windows friendly
shell = os.environ.get("SHELL", "/bin/bash")
cmd = (shell, "-c", self.content)
self._print_action(self.content, dry)
if dry:
# Don't actually run anything...
return
self._execute(project_dir, cmd, env)

@classmethod
def _validate_task_def(cls, task_def: TaskDef) -> Optional[str]:
"""
Expand Down

0 comments on commit cfbd29b

Please sign in to comment.