mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:46:54 +00:00
fix(cli): improve path error message for paths with spaces
This commit is contained in:
parent
b4b3e6716a
commit
12297a3c12
@ -11,6 +11,14 @@ if (require('semver').satisfies(process.version, '<16')) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (__dirname.includes(' ')) {
|
||||
console.error(chalk.red(`[nocobase cli]: PathError: Invalid path "${process.cwd()}"`));
|
||||
console.error(
|
||||
chalk.red('[nocobase cli]: PathError: The path cannot contain spaces. Please modify the path and try again.'),
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// if (require('semver').satisfies(process.version, '>16') && !process.env.UNSET_NODE_OPTIONS) {
|
||||
// if (process.env.NODE_OPTIONS) {
|
||||
// let opts = process.env.NODE_OPTIONS;
|
||||
|
Loading…
Reference in New Issue
Block a user