Page MenuHomePhabricator

arc version fails on Windows
Closed, ResolvedPublic

Description

PS C:\Users\marpidone> arc version
Exception
Command failed with error #128!
COMMAND
git log -1 --format=" H  ct"

STDOUT
(empty)

STDERR
fatal: invalid --pretty format:  H  ct

(Run with `--trace` for a full exception trace.)

It appears to be trying to execute

git log -1 --format="%H %ct"

except that it's passing "%H %ct" to PHP's escapeshellarg, which is documented to strip %'s on Windows.

Quoting from http://php.net/manual/en/function.escapeshellarg.php

On Windows, escapeshellarg() instead removes percent signs, replaces double quotes with spaces and adds double quotes around the string.

Apparently by "removes percent signs" they mean "replaces percent signs with spaces", because that's what it's doing on my machine at least.

Revisions and Commits

Restricted Differential Revision

Event Timeline

marpidone raised the priority of this task from to Needs Triage.
marpidone updated the task description. (Show Details)
marpidone added a project: Arcanist.
marpidone added a subscriber: marpidone.
epriestley added a subscriber: epriestley.

This is blocked by T8298: specifically, we don't currently know how to fix this in the general case.

BYK added a revision: Restricted Differential Revision.Apr 10 2016, 4:04 PM
epriestley added a revision: Restricted Differential Revision.Sep 2 2017, 1:04 AM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Sep 2 2017, 1:06 AM
epriestley added a commit: Restricted Diffusion Commit.