mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
fix(path): error if booted from wrong folder
This commit is contained in:
parent
62ee42476f
commit
a3baef8d62
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue