Skip to content

Instantly share code, notes, and snippets.

@janl
Created February 26, 2014 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janl/9231277 to your computer and use it in GitHub Desktop.
Save janl/9231277 to your computer and use it in GitHub Desktop.
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