1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2025-02-16 16:58:38 +01:00

Cheat our way through arc version on Windows for the moment

Summary: Fixes T8291. See PHI52. This is papering over the real issue (T8298) but it's a 10-second patch so just improve things slightly for now.

Test Plan: Ran `arc version` locally; patch confirmed on a Windows system by an affected user.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8291

Differential Revision: https://secure.phabricator.com/D18518
This commit is contained in:
epriestley 2017-09-01 17:11:11 -07:00
parent ad8214456a
commit d9cb5b18fb

View file

@ -51,8 +51,14 @@ EOTEXT
pht('%s is not a git working copy.', $lib));
}
list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct');
list($commit, $timestamp) = explode(' ', $stdout);
// NOTE: Carefully execute these commands in a way that works on Windows
// until T8298 is properly fixed. See PHI52.
list($commit) = $repository->execxLocal('log -1 --format=%%H');
$commit = trim($commit);
list($timestamp) = $repository->execxLocal('log -1 --format=%%ct');
$timestamp = trim($timestamp);
$console->writeOut(
"%s %s (%s)\n",