mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08: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);
|
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 (require('semver').satisfies(process.version, '>16') && !process.env.UNSET_NODE_OPTIONS) {
|
||||||
// if (process.env.NODE_OPTIONS) {
|
// if (process.env.NODE_OPTIONS) {
|
||||||
// let opts = process.env.NODE_OPTIONS;
|
// let opts = process.env.NODE_OPTIONS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user