diff options
author | Oliver Poignant <oliver@poignant.se> | 2016-05-29 09:27:53 +0000 |
---|---|---|
committer | Oliver Poignant <oliver@poignant.se> | 2016-05-29 09:27:53 +0000 |
commit | f44d73fd7b2f047c0b1deac0b596539ba7877e8e (patch) | |
tree | 117dd940cfc8c15edb6bc154845c47c5d4e8eb26 /gitautodeploy/wrappers/git.py | |
parent | b2f95fa7a1f12ea4b8029320db4c7458a9a32feb (diff) | |
download | Git-Auto-Deploy-f44d73fd7b2f047c0b1deac0b596539ba7877e8e.zip Git-Auto-Deploy-f44d73fd7b2f047c0b1deac0b596539ba7877e8e.tar.gz Git-Auto-Deploy-f44d73fd7b2f047c0b1deac0b596539ba7877e8e.tar.bz2 |
Require bash.exe in PATH for windows users
Diffstat (limited to 'gitautodeploy/wrappers/git.py')
-rw-r--r-- | gitautodeploy/wrappers/git.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gitautodeploy/wrappers/git.py b/gitautodeploy/wrappers/git.py index 3f29341..5f97171 100644 --- a/gitautodeploy/wrappers/git.py +++ b/gitautodeploy/wrappers/git.py @@ -23,11 +23,13 @@ class GitWrapper(): commands = [] + # On Windows, bash command needs to be run using bash.exe. This assumes bash.exe + # (typically installed under C:\Program Files\Git\bin) is in the system PATH. if platform.system().lower() == "windows": - # This assumes Git for Windows is installed. - commands.append('"\Program Files\Git\usr\\bin\\bash.exe" -c "cd ' + repo_config['path']) + commands.append('bash -c "cd \\"' + repo_config['path'] + '\\" && unset GIT_DIR"') + else: + commands.append('unset GIT_DIR') - commands.append('unset GIT_DIR') commands.append('git fetch ' + repo_config['remote']) commands.append('git reset --hard ' + repo_config['remote'] + '/' + repo_config['branch']) commands.append('git submodule init') |