Skip to content

Commit

Permalink
git: using full python path for running nbstripout during checkRepo
Browse files Browse the repository at this point in the history
  • Loading branch information
ibressler committed Sep 28, 2020
1 parent 9e5943f commit 1fbe3cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions git.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
# git.py

import os
import sys
import subprocess

def isRepo(path):
return os.path.exists(os.path.join(path, ".git"))

def isNBstripoutInstalled():
out = subprocess.run(["nbstripout", "--status"],
out = subprocess.run([sys.executable, "-m", "nbstripout", "--status"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.decode("utf-8")
return len(out) and "not recognized" not in out

def isNBstripoutActivated():
out = subprocess.run(["nbstripout", "--status"],
out = subprocess.run([sys.executable, "-m", "nbstripout", "--status"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).stdout.decode("utf-8")
return len(out) and "is installed" in out

Expand Down

0 comments on commit 1fbe3cc

Please sign in to comment.