Skip to content

Commit

Permalink
fix: rearrange internal checks for pip check
Browse files Browse the repository at this point in the history
  • Loading branch information
bepri committed Oct 11, 2024
1 parent b7fc57b commit 7bbaa57
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charmcraft/linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,13 +679,13 @@ class PipCheck(Linter):

def run(self, basedir: pathlib.Path) -> str:
"""Run pip check."""
if sys.platform == "win32":
self.text = "Linter does not work on Windows."
return self.Result.NONAPPLICABLE
venv_dir = basedir / "venv"
if not venv_dir.is_dir():
self.text = "Charm does not contain a Python venv."
return self.Result.NONAPPLICABLE
if sys.platform == "win32":
self.text = "Linter does not work on Windows."
return self.Result.NONAPPLICABLE
python_exe = venv_dir / "bin" / "python"
delete_parent = False
if not python_exe.parent.exists():
Expand Down

0 comments on commit 7bbaa57

Please sign in to comment.