Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(cli): pass `PATH` into child process

himself65eb7d5fd7a166
diff --git a/packages/cli/src/dev.mjs b/packages/cli/src/dev.mjs
old mode 100644
new mode 100755
index f19f1def43..710430b19e
--- a/packages/cli/src/dev.mjs
+++ b/packages/cli/src/dev.mjs
@@ -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',