Page MenuHomePhabricator

Fix root path finding on Windows
AbandonedPublic

Authored by BYK on Apr 10 2016, 4:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 4:49 AM
Unknown Object (File)
Thu, Nov 21, 6:27 PM
Unknown Object (File)
Thu, Nov 21, 10:07 AM
Unknown Object (File)
Tue, Nov 19, 10:27 PM
Unknown Object (File)
Sat, Nov 16, 1:23 AM
Unknown Object (File)
Fri, Nov 15, 11:05 PM
Unknown Object (File)
Tue, Nov 12, 12:07 AM
Unknown Object (File)
Sun, Nov 10, 2:04 AM

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 15173
Build 19933: 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?