From 9fac2103c54836d1447bec7439304979a162d101 Mon Sep 17 00:00:00 2001 From: spengreb Date: Fri, 30 Aug 2019 13:40:14 +0200 Subject: [PATCH] Change logic for checking if dir is a git dir. --- atmos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atmos.py b/atmos.py index 077d1be..62510e4 100755 --- a/atmos.py +++ b/atmos.py @@ -48,8 +48,8 @@ def determine_actions(args, params): with subprocess.Popen(shlex.split(cmd)) as proc: exit # Start process but kill py program -def is_git_directory(path = '.'): - return subprocess.call(['git', '-C', path, 'status'], stderr=subprocess.STDOUT, stdout = open(os.devnull, 'w')) == 0 +def is_git_directory(): + return subprocess.call(['git', 'branch'], stderr=subprocess.STDOUT, stdout = open(os.devnull, 'w')) == 0 def workspace_manager(): branch = subprocess.getoutput("git rev-parse --abbrev-ref HEAD")