Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed path issue with loading package.json #6

Merged
merged 1 commit into from

1 participant

@kgriffs
Owner

No description provided.

@kgriffs kgriffs merged commit c09a4b0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 29, 2012
  1. @kgriffs
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/moruga.js
View
3  lib/moruga.js
@@ -200,7 +200,8 @@ moruga.createServer = function (options, app) {
}
moruga.printVersion = function() {
- var pkg = JSON.parse(fs.readFileSync('./package.json'));
+ var filename = path.join(path.dirname(module.filename), '..', 'package.json');
+ var pkg = JSON.parse(fs.readFileSync(filename));
console.log(pkg.version);
}
Something went wrong with that request. Please try again.