fix(cli): Use server-side start-by-id flow for starting processes
This commit is contained in:
@@ -17,14 +17,8 @@ export function registerStartCommand(smartcli: plugins.smartcli.Smartcli) {
|
||||
return;
|
||||
}
|
||||
|
||||
const desc = await tspmIpcClient.request('describe', { id }).catch(() => null);
|
||||
if (!desc) {
|
||||
console.error(`Process with id '${id}' not found. Use 'tspm add' first.`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Starting process id ${id} (${desc.config.name || id})...`);
|
||||
const response = await tspmIpcClient.request('start', { config: desc.config });
|
||||
console.log(`Starting process id ${id}...`);
|
||||
const response = await tspmIpcClient.request('startById', { id });
|
||||
console.log('✓ Process started');
|
||||
console.log(` ID: ${response.processId}`);
|
||||
console.log(` PID: ${response.pid || 'N/A'}`);
|
||||
|
Reference in New Issue
Block a user