fix delete-fork cli command (#6583)

This commit is contained in:
wendrul
2025-09-11 14:23:43 +02:00
committed by GitHub
parent cabc677681
commit 1cbc93a6c8
+1 -5
View File
@@ -145,20 +145,16 @@ async function deleteWorkspaceFork(
opts: GlobalOptions & {
yes?: boolean;
},
silent: boolean,
name: string,
) {
const orgWorkspaces = await allWorkspaces(opts.configDir);
const idxOf = orgWorkspaces.findIndex((x) => x.name === name) ;
if (idxOf === -1) {
if (!silent) {
log.info(
colors.red.bold(`! Workspace profile ${name} does not exist locally`)
);
log.info("available workspace profiles:");
await list(opts);
}
return;
}
@@ -198,7 +194,7 @@ async function deleteWorkspaceFork(
log.info(
colors.green(`✅ Forked workspace '${workspace.workspaceId}' deleted successfully!\n${result}`),
);
await removeWorkspace(name, silent, opts);
await removeWorkspace(name, false, opts);
}
export { createWorkspaceFork, deleteWorkspaceFork };