fix(cli): improve project metadata loading and normalize CLI error handling
This commit is contained in:
@@ -14,7 +14,7 @@ export async function interactiveEditProcess(processId: number): Promise<void> {
|
||||
message: 'Process name:',
|
||||
default: config.name,
|
||||
validate: (input: string) => {
|
||||
return input && input.trim() !== '';
|
||||
return input.trim() !== '';
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -23,7 +23,7 @@ export async function interactiveEditProcess(processId: number): Promise<void> {
|
||||
message: 'Command to execute:',
|
||||
default: config.command,
|
||||
validate: (input: string) => {
|
||||
return input && input.trim() !== '';
|
||||
return input.trim() !== '';
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -32,7 +32,7 @@ export async function interactiveEditProcess(processId: number): Promise<void> {
|
||||
message: 'Working directory:',
|
||||
default: config.projectDir,
|
||||
validate: (input: string) => {
|
||||
return input && input.trim() !== '';
|
||||
return input.trim() !== '';
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -161,4 +161,4 @@ export async function interactiveEditProcess(processId: number): Promise<void> {
|
||||
if (updates.autorestart !== undefined) console.log(` Auto-restart: ${updates.autorestart}`);
|
||||
if (updates.watch !== undefined) console.log(` Watch: ${updates.watch ? 'enabled' : 'disabled'}`);
|
||||
if (updateEnv) console.log(' Environment variables: updated');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user