Skip to content

Commit

Permalink
Merge pull request #24 from CrowdJustice/Eating-called-process-error
Browse files Browse the repository at this point in the history
eating called process error
  • Loading branch information
phil-bell authored Mar 8, 2022
2 parents 8b71015 + 660925d commit 7226598
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions legl_dev/command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3

from subprocess import run
from threading import Thread
import typer
from subprocess import run, CalledProcessError
from typing import Union


Expand All @@ -15,12 +14,16 @@ def __init__(
self.shell = shell

def run(self) -> None:
run(
self.command if self.shell else self.command.split(),
universal_newlines=True,
shell=self.shell,
check=True,
)
try:
run(
self.command if self.shell else self.command.split(),
universal_newlines=True,
shell=self.shell,
check=True,
)
typer.secho(f"✅ Command successful!", fg=typer.colors.GREEN)
except CalledProcessError:
typer.secho(f"⚠️ Command exited without a none 0 exit!", fg=typer.colors.YELLOW)


class Steps:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from setuptools import setup

version = "1.1.1"
version = "1.1.2"

packages = ["legl_dev"]

Expand Down

0 comments on commit 7226598

Please sign in to comment.