Skip to content

Commit

Permalink
DAG-1627 fix evg-module-manager patch crash (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincivans authored Jan 26, 2022
1 parent 22637c8 commit a3907a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.1.9 - 2022-01-25
- Add check for github CLI installation

## 0.1.8 - 2021-12-29
- Add support for github pull request

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "evg-module-manager"
version = "0.1.8"
version = "0.1.9"
description = "Manage Evergreen modules locally."
authors = ["Dev Prod DAG <[email protected]>"]
license = "Apache-2.0"
Expand Down
6 changes: 6 additions & 0 deletions src/emm/services/github_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Service for working with github CLI."""
import shutil
from pathlib import Path
from typing import List, Optional

Expand All @@ -19,6 +20,11 @@ def __init__(self, gh_cli: local) -> None:
@classmethod
def create(cls) -> local:
"""Initialize the github cli in command line."""
if not shutil.which("gh"):
raise SystemExit(
"Please make sure you've installed the Github CLI. "
"Instructions on how to do so can be found at https://cli.github.com/."
)
return cls(local.cmd.gh)

def pull_request(self, extra_args: List[str], directory: Optional[Path] = None) -> str:
Expand Down

0 comments on commit a3907a4

Please sign in to comment.