From d78017ac404780cbc7a84dbea3e64d9315bce24f Mon Sep 17 00:00:00 2001 From: TomyJan Date: Sat, 14 Sep 2024 18:29:27 +0800 Subject: [PATCH] fix: run in linux (#1538) Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1538 Co-authored-by: TomyJan Co-committed-by: TomyJan --- packages/core/cli/src/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/core/cli/src/util.ts b/packages/core/cli/src/util.ts index 155da8147..849c34304 100644 --- a/packages/core/cli/src/util.ts +++ b/packages/core/cli/src/util.ts @@ -15,7 +15,7 @@ import { import { readFile, writeFile } from 'fs/promises'; import { createRequire } from 'module'; import { Socket } from 'net'; -import { dirname, join, resolve, sep, win32 } from 'path'; +import { dirname, join, resolve, sep } from 'path'; import chalk from 'chalk'; import { config } from 'dotenv'; @@ -208,7 +208,9 @@ export function generateAppDir() { } process.env.APP_PACKAGE_ROOT = appDevDir; } else { - if (win32.isAbsolute(appPkgPath)) { + process.env.APP_PACKAGE_ROOT = appPkgPath; + const isWindows = process.platform === 'win32'; + if (isWindows) { // windows /c:/xxx process.env.APP_PACKAGE_ROOT = appPkgPath.substring(1); } else {