Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/281981

Change subject: Fix arcanist on windows
......................................................................

Fix arcanist on windows

Currently running arc on git for windows bash results in a proc_open
error, im not sure why or why it dosen't work.

Arcanist works in cmd but not in git for windows bash.

This is the error i get when running arc land from git for windows bash.

Change-Id: I6ef262e058dc8f895b351b85b2f00830f74734fa
---
M src/repository/api/ArcanistGitAPI.php
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/phabricator/arcanist 
refs/changes/81/281981/1

diff --git a/src/repository/api/ArcanistGitAPI.php 
b/src/repository/api/ArcanistGitAPI.php
index 8600674..18a2b51 100644
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -31,11 +31,15 @@
     static $git = null;
     if ($git === null) {
       if (phutil_is_windows()) {
-        // NOTE: On Windows, phutil_passthru() uses 'bypass_shell' because
-        // everything goes to hell if we don't. We must provide an absolute
-        // path to Git for this to work properly.
-        $git = Filesystem::resolveBinary('git');
-        $git = csprintf('%s', $git);
+        if ( substr(getenv('SHELL'), -11) !== 'git-bash.exe' ) {
+          $git = 'git';
+        } else {
+          // NOTE: On Windows, phutil_passthru() uses 'bypass_shell' because
+          // everything goes to hell if we don't. We must provide an absolute
+          // path to Git for this to work properly.
+          $git = Filesystem::resolveBinary('git');
+          $git = csprintf('%s', $git);
+        }
       } else {
         $git = 'git';
       }

-- 
To view, visit https://gerrit.wikimedia.org/r/281981
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ef262e058dc8f895b351b85b2f00830f74734fa
Gerrit-PatchSet: 1
Gerrit-Project: phabricator/arcanist
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to