Skip to content

Instantly share code, notes, and snippets.

@janl janl/gist:9231277
Created Feb 26, 2014

Embed
What would you like to do?
diff --git a/lib/core/environment.js b/lib/core/environment.js
index 28eaead..7f1706f 100644
--- a/lib/core/environment.js
+++ b/lib/core/environment.js
@@ -20,10 +20,10 @@ var utils = require('../utils');
exports.getConfig = function (platform, env, project_dir, argv) {
// Remove driver letter on windows
- project_dir = '/' + path.relative('/', project_dir);
+ project_dir = path.resolve('/', path.relative('/', project_dir));
// location of project's package.json
- var pkgfile = require(project_dir + '/package.json');
+ var pkgfile = require(path.resolve(project_dir, '/package.json'));
// default platform-agnostic config
var cfg = {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.