-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
…EPATH, and added in the wich package for fining git, curl and meteor. This seems to work reasonably well in cmd.exe and in cygwin. Still working on test issues though.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,14 @@ var writeUserTokenFile = function(user) { | |
var cfg = { | ||
user: user | ||
}; | ||
var filePath = path.join(process.env.HOME, '.mrt.cfg'); | ||
var filePath = path.join(process.env.HOME || process.env.HOMEPATH, '.mrt.cfg'); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
seanmwalker
Author
|
||
|
||
fs.writeFileSync(filePath, JSON.stringify(cfg)); | ||
fs.chmodSync(filePath, '0600'); | ||
}; | ||
|
||
var readUserTokenFile = function() { | ||
var filePath = path.join(process.env.HOME, '.mrt.cfg'); | ||
var filePath = path.join(process.env.HOME || process.env.HOMEPATH, '.mrt.cfg'); | ||
|
||
var fileContents = fs.readFileSync(filePath); | ||
return JSON.parse(fileContents); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ var fs = require('fs'); | |
var wrench = require('wrench'); | ||
var _ = require('underscore'); | ||
var ddp = require('ddp'); | ||
var which = require('which'); | ||
|
||
var utils = require('../lib/utils.js'); | ||
var atmosphere = require('../lib/atmosphere.js'); | ||
|
@@ -15,8 +16,11 @@ var appDir = path.join(appHome, 'app'); | |
|
||
before(function(done){ | ||
// ensure our "cached" CURL is in the path | ||
process.env._METEORITE_REAL_GIT = which.sync('git'); | ||
process.env.PATH = [path.resolve(path.join('spec', 'support', 'bin')), process.env.PATH].join(':'); | ||
|
||
process.env._METEORITE_REAL_CURL = which.sync('curl'); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
yeputons
Contributor
|
||
process.env._METEORITE_REAL_METEOR = path.basename(which.sync('meteor')); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
seanmwalker
Author
|
||
|
||
// make sure Meteor doesn't try to install into our soon to be clean home dir | ||
process.env.METEOR_WAREHOUSE_DIR = path.join(process.env.HOME, '.meteor'); | ||
|
||
|
@@ -27,7 +31,7 @@ before(function(done){ | |
console.log("Preparing..") | ||
// ensure we have the latest dev bundle cached | ||
console.log(" Ensuring we have the dev bundle for system meteor"); | ||
utils.downloadDevBundle('meteor', function() { | ||
utils.downloadDevBundle(process.env._METEORITE_REAL_METEOR, function() { | ||
// ensure we have dev bundles for all our meteor forks | ||
// XXX: | ||
// for meteor in meteors/ | ||
|
@@ -62,4 +66,4 @@ beforeEach(function() { | |
} | ||
} | ||
fs.mkdirSync(appHome); | ||
}); | ||
}); |
HOMEPATH
does not contain system drive letter. Like this:\Users\yeputons
. You should concatenate it withHOMEDRIVE
, which may contain something likeD: