Page MenuHomePhabricator

Fix root path finding on Windows
AbandonedPublic

Authored by BYK on Apr 10 2016, 4:04 PM.
Tags
None
Referenced Files
F14027756: D15676.diff
Fri, Nov 8, 9:05 AM
F14012012: D15676.id40320.diff
Fri, Nov 1, 6:54 AM
F14004216: D15676.id40320.diff
Sat, Oct 26, 5:11 PM
F13983536: D15676.id37769.diff
Sun, Oct 20, 7:08 AM
F13981861: D15676.id40109.diff
Sat, Oct 19, 7:31 PM
F13966544: D15676.id40320.diff
Wed, Oct 16, 8:28 AM
F13965900: D15676.diff
Wed, Oct 16, 4:54 AM
F13959425: D15676.id.diff
Mon, Oct 14, 7:20 PM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Maniphest Tasks
T8291: arc version fails on Windows
Summary

/ is not a root path on Windows and when using commands like arc version it resolves to the current working directory. This patch replaces the default / with %HOMEDRIVE% to fix the issue.

This patch fixes T8291 when combined with D15675.

Test Plan

Manual verification on Windows.

Diff Detail

Repository
rPHU libphutil
Branch
windows-root-path
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14212
Build 18473: arc lint + arc unit

Event Timeline

BYK retitled this revision from to Fix root path finding on Windows.
BYK updated this object.
BYK edited the test plan for this revision. (Show Details)
BYK added a reviewer: epriestley.
eadler added inline comments.
src/filesystem/Filesystem.php
780–782

won't this fail if arc is run on a project checked out to a drive other than %HOMEDRIVE%?

src/filesystem/Filesystem.php
780–782

Possibly. That said there's not reliable equivalent of / on Windows AFAIK. If you think getting the install drive for arc is a better option, I can update accordingly.

Btw. this section is gonna change substantially since there are some other issues I realized when fixing tests. Updating coming soon.

BYK edited edge metadata.
  • Fix test failures

Anything I can do to move this one forward?