fix(path): error if booted from wrong folder

This commit is contained in:
Evan Morikawa 2016-04-25 14:28:21 -07:00
parent 62ee42476f
commit a3baef8d62
2 changed files with 14 additions and 0 deletions

View file

@ -7,6 +7,16 @@ mkdirp = require 'mkdirp'
start = ->
args = parseCommandLine()
# Note that HFS+ (the Mac filesystem) is case insensitive but case
# preserving. This means it's possible to erroneously set process.cwd
# to `/n1` instead of `/N1`. Since we use symlinks that have `N1`
# (uppercase) embedded in them, it's important the case matches. If it
# doesn't the require cache will fail for symlinked packages.
if args.devMode and /n1/.test(__dirname)
console.error("You must cd into `/N1` (uppercase) instead of `/n1` (lowercase).")
process.exit(1)
global.errorLogger = setupErrorLogger(args)
configDirPath = setupConfigDir(args)
args.configDirPath = configDirPath

View file

@ -15,6 +15,10 @@
start = function() {
var addFileToOpen, addUrlToOpen, args, configDirPath;
args = parseCommandLine();
if (args.devMode && /n1/.test(__dirname)) {
console.error("You must cd into `/N1` (uppercase) instead of `/n1` (lowercase).");
process.exit(1);
}
global.errorLogger = setupErrorLogger(args);
configDirPath = setupConfigDir(args);
args.configDirPath = configDirPath;