Skip to content

Commit 7324d99

Browse files
authored
fix: should stop app when baseDir is symlink (#12)
1 parent f5d502e commit 7324d99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cmd/stop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class StopCommand extends Command {
3737
// node /Users/tz/Workspaces/eggjs/egg-scripts/lib/start-cluster {"title":"egg-server","workers":4,"port":7001,"baseDir":"/Users/tz/Workspaces/eggjs/test/showcase","framework":"/Users/tz/Workspaces/eggjs/test/showcase/node_modules/egg"}
3838
let processList = yield this.helper.findNodeProcess(item => {
3939
const cmd = item.cmd;
40-
return cmd.includes(this.serverBin) && cmd.includes(`"baseDir":"${baseDir}"`);
40+
return cmd.includes('start-cluster');
4141
});
4242
let pids = processList.map(x => x.pid);
4343

@@ -55,7 +55,7 @@ class StopCommand extends Command {
5555
// node /Users/tz/Workspaces/eggjs/test/showcase/node_modules/[email protected]@egg-cluster/lib/app_worker.js {"framework":"/Users/tz/Workspaces/eggjs/test/showcase/node_modules/egg","baseDir":"/Users/tz/Workspaces/eggjs/test/showcase","port":7001,"workers":2,"plugins":null,"https":false,"key":"","cert":"","title":"egg-server","clusterPort":52406}
5656
processList = yield this.helper.findNodeProcess(item => {
5757
const cmd = item.cmd;
58-
return cmd.includes(`"baseDir":"${baseDir}"`) && (cmd.includes('app_worker.js') || cmd.includes('agent_worker.js'));
58+
return cmd.includes('egg-cluster/lib/app_worker.js') || cmd.includes('egg-cluster/lib/agent_worker.js');
5959
});
6060
pids = processList.map(x => x.pid);
6161

0 commit comments

Comments
 (0)