Page MenuHomePhabricator

Exception while running arc diff/land script from git extension.
Closed, InvalidPublic


Hi, I'm using:
arcanist ade25facfdf22aed1c1e20fed3e58e60c0be3c2b (6 Jan 2017)
libphutil 9d85dfab0f532d50c2343719e92d574a4827341b (13 Jan 2017)
PHP 7.1.0
git extension 2.49.

I've created in git extension buttons to execute next script for phabracator: Command: C:\Windows\System32\cmd.exe Arguments: /c start bash.exe --login -i -c "arc diff --trace; read -p\"Finished! Press Enter\" "

It worked fine on other machines but now on laptop I'm receiving next error:

←[1m←[45m ARGV ←[49m←[m "C:/Arcanist/arcanist/bin/../scripts/arcanist.php" "diff
" "--trace"
←[1m←[45m LOAD ←[49m←[m Loaded "phutil" from "C:\Arcanist\libphutil\src".
←[1m←[45m LOAD ←[49m←[m Loaded "arcanist" from "C:\Arcanist\arcanist\src".
Config: Reading user configuration file "C:\Users\someUser\AppData\Roaming/.a
Config: Did not find system configuration at "C:\ProgramData\Phabricator/Arcanis
Working Copy: Reading .arcconfig from "C:\d\Git\15.1.1\Foundation/.arcconfig".
Working Copy: Path "C:\d\Git\15.1.1\Foundation" is part of `git` working copy "C
Working Copy: Project root is at "C:\d\Git\15.1.1\Foundation".
Config: Did not find local configuration at "C:\d\Git\15.1.1\Foundation\.git\arc
>>> [0] <conduit> user.whoami() <bytes = 117>
>>> [1] <http> http://someAddress.lab.local/api/user.whoami
<<< [1] <http> 1,549,000 us
<<< [0] <conduit> 1,552,000 us
>>> [2] <exec> $ git diff --no-ext-diff --no-textconv --raw "HEAD" --
>>> [3] <exec> $ git ls-files --others --exclude-standard
<<< [3] <exec> 40,999 us
<<< [2] <exec> 50,999 us
>>> [4] <exec> $ git diff-files --name-only

[2017-01-15 20:11:29] EXCEPTION: (CommandException) Command failed with error #1
git diff --no-ext-diff --no-textconv --raw "HEAD" --


'git' is not recognized as an internal or external command,
operable program or batch file.
 at [<phutil>\src\future\exec\ExecFuture.php:369]
arcanist(head=master, ref.master=ade25facfdf2), phutil(head=master, ref.master=9
  #0 ExecFuture::resolvex() called at [<arcanist>\src\repository\api\ArcanistGit
  #1 ArcanistGitAPI::buildUncommittedStatus() called at [<arcanist>\src\reposito
  #2 ArcanistRepositoryAPI::getUncommittedStatus() called at [<arcanist>\src\rep
  #3 ArcanistRepositoryAPI::getUncommittedPathsWithMask(integer) called at [<arc
  #4 ArcanistRepositoryAPI::getIncompleteChanges() called at [<arcanist>\src\wor
  #5 ArcanistWorkflow::requireCleanWorkingCopy() called at [<arcanist>\src\workf
  #6 ArcanistDiffWorkflow::runDiffSetupBasics() called at [<arcanist>\src\workfl
  #7 ArcanistDiffWorkflow::run() called at [<arcanist>\scripts\arcanist.php:394]

Finished! Press Enter

When I'm also trying to land something using script from git extension I'm receiving similar exception. All needed system variables are set. It seems to me that there is some problem with windows path encoding. I had broken arc version, but now I've fixed it according to T8821 . But that fix didn't helped with arc diff from git extension. When I'm running arc diff from console it works fine, but when it is done by script from git extension it is broken. Please help.

Event Timeline

Assuming "git extensions" is - this is rather outside of the scope of support you can get here. I suggest you contact them to figure out how to get the PATH to be properly populated (git isn't in your path).