fix: run in linux (#1538)
Reviewed-on: daoyoucloud/tachybase#1538 Co-authored-by: TomyJan <TomyJan6@gmail.com> Co-committed-by: TomyJan <TomyJan6@gmail.com>
This commit is contained in:
parent
f1cfe2259e
commit
d78017ac40
@ -15,7 +15,7 @@ import {
|
|||||||
import { readFile, writeFile } from 'fs/promises';
|
import { readFile, writeFile } from 'fs/promises';
|
||||||
import { createRequire } from 'module';
|
import { createRequire } from 'module';
|
||||||
import { Socket } from 'net';
|
import { Socket } from 'net';
|
||||||
import { dirname, join, resolve, sep, win32 } from 'path';
|
import { dirname, join, resolve, sep } from 'path';
|
||||||
|
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import { config } from 'dotenv';
|
import { config } from 'dotenv';
|
||||||
@ -208,7 +208,9 @@ export function generateAppDir() {
|
|||||||
}
|
}
|
||||||
process.env.APP_PACKAGE_ROOT = appDevDir;
|
process.env.APP_PACKAGE_ROOT = appDevDir;
|
||||||
} else {
|
} else {
|
||||||
if (win32.isAbsolute(appPkgPath)) {
|
process.env.APP_PACKAGE_ROOT = appPkgPath;
|
||||||
|
const isWindows = process.platform === 'win32';
|
||||||
|
if (isWindows) {
|
||||||
// windows /c:/xxx
|
// windows /c:/xxx
|
||||||
process.env.APP_PACKAGE_ROOT = appPkgPath.substring(1);
|
process.env.APP_PACKAGE_ROOT = appPkgPath.substring(1);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user