From 4924a8a7b62e59ac57be8f1baa90f2e8641d805f Mon Sep 17 00:00:00 2001 From: Reid Burke Date: Fri, 20 Dec 2013 13:03:34 -0600 Subject: [PATCH] Use USERPROFILE instead of HOME on win32. Fix Windows support. Remove HOME workaround from README. --- README.md | 11 ----------- lib/cli/configuration.js | 4 +++- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 361bd331..3eabf3e4 100644 --- a/README.md +++ b/README.md @@ -62,17 +62,6 @@ Point your browsers at that URL, then come back and press Enter. Yeti exits automatically when all tests complete. If test failures occur, Yeti will exit with a non-zero status code. -Please note before using Yeti on Windows, you must issue one of the following commands, depending on which command-line interface you are using: - -MS-DOS: - - set HOME = C:\Users\ - -Windows PowerShell: - - $Env:HOME = "C:\Users\" - - #### JUnit XML output Yeti can output machine-readable JUnit XML suitable for use in [Jenkins][] with the `--junit` option. diff --git a/lib/cli/configuration.js b/lib/cli/configuration.js index 3a13dcef..8815a5a3 100644 --- a/lib/cli/configuration.js +++ b/lib/cli/configuration.js @@ -216,7 +216,9 @@ proto.find = function () { * @chainable */ proto.home = function () { - this.importFromDirectory(this.process.env.HOME, true); + var isWindows = process.platform === "win32", + home = isWindows ? this.process.env.USERPROFILE : this.process.env.HOME; + this.importFromDirectory(home, true); return this; };