mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix(cli): pass PATH into child process
This commit is contained in:
8
packages/cli/src/dev.mjs
Normal file → Executable file
8
packages/cli/src/dev.mjs
Normal file → Executable file
@@ -4,7 +4,7 @@ import * as path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import * as p from '@clack/prompts';
|
||||
|
||||
import os from 'os';
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -46,11 +46,13 @@ if (dev.server === 'local') {
|
||||
|
||||
const env = {
|
||||
NODE_API_SERVER: dev.server,
|
||||
PATH: process.env.PATH,
|
||||
};
|
||||
|
||||
const cwd = path.resolve(__dirname, '..', '..', '..', 'apps', 'web');
|
||||
const root = path.resolve(__dirname, '..', '..', '..');
|
||||
const cwd = path.resolve(root, 'apps', 'web');
|
||||
|
||||
const process = spawn('yarn', ['dev'], {
|
||||
spawn('yarn', ['dev'], {
|
||||
env,
|
||||
cwd,
|
||||
stdio: 'inherit',
|
||||
|
||||
Reference in New Issue
Block a user