fix(installer): propagate wizard gateway failures (#1120)
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
This commit is contained in:
@@ -348,18 +348,21 @@ async function runFinishPath(
|
||||
providerType: state.providerType,
|
||||
});
|
||||
|
||||
if (configResult.ready && configResult.host && configResult.port) {
|
||||
const bootstrapResult = await gatewayBootstrapStage(prompter, state, {
|
||||
host: configResult.host,
|
||||
port: configResult.port,
|
||||
});
|
||||
if (!bootstrapResult.completed) {
|
||||
prompter.warn('Admin bootstrap failed — aborting wizard.');
|
||||
process.exit(1);
|
||||
return;
|
||||
}
|
||||
finalizeResult.showSummary();
|
||||
if (!configResult.ready || !configResult.host || !configResult.port) {
|
||||
const message = 'Gateway configuration failed — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
const bootstrapResult = await gatewayBootstrapStage(prompter, state, {
|
||||
host: configResult.host,
|
||||
port: configResult.port,
|
||||
});
|
||||
if (!bootstrapResult.completed) {
|
||||
const message = 'Admin bootstrap failed — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
finalizeResult.showSummary();
|
||||
} catch (err) {
|
||||
prompter.warn(`Gateway setup failed: ${err instanceof Error ? err.message : String(err)}`);
|
||||
throw err;
|
||||
@@ -420,9 +423,9 @@ async function runHeadlessPath(
|
||||
});
|
||||
|
||||
if (!configResult.ready || !configResult.host || !configResult.port) {
|
||||
prompter.warn('Gateway configuration failed in headless mode — aborting wizard.');
|
||||
process.exit(1);
|
||||
return;
|
||||
const message = 'Gateway configuration failed in headless mode — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
|
||||
const bootstrapResult = await gatewayBootstrapStage(prompter, state, {
|
||||
@@ -430,9 +433,9 @@ async function runHeadlessPath(
|
||||
port: configResult.port,
|
||||
});
|
||||
if (!bootstrapResult.completed) {
|
||||
prompter.warn('Admin bootstrap failed — aborting wizard.');
|
||||
process.exit(1);
|
||||
return;
|
||||
const message = 'Admin bootstrap failed — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
finalizeResult.showSummary();
|
||||
} catch (err) {
|
||||
@@ -477,18 +480,21 @@ async function runKeepPath(
|
||||
skipInstall: options.skipGatewayNpmInstall,
|
||||
});
|
||||
|
||||
if (configResult.ready && configResult.host && configResult.port) {
|
||||
const bootstrapResult = await gatewayBootstrapStage(prompter, state, {
|
||||
host: configResult.host,
|
||||
port: configResult.port,
|
||||
});
|
||||
if (!bootstrapResult.completed) {
|
||||
prompter.warn('Admin bootstrap failed — aborting wizard.');
|
||||
process.exit(1);
|
||||
return;
|
||||
}
|
||||
finalizeResult.showSummary();
|
||||
if (!configResult.ready || !configResult.host || !configResult.port) {
|
||||
const message = 'Gateway configuration failed — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
const bootstrapResult = await gatewayBootstrapStage(prompter, state, {
|
||||
host: configResult.host,
|
||||
port: configResult.port,
|
||||
});
|
||||
if (!bootstrapResult.completed) {
|
||||
const message = 'Admin bootstrap failed — aborting wizard.';
|
||||
prompter.warn(message);
|
||||
throw new Error(message);
|
||||
}
|
||||
finalizeResult.showSummary();
|
||||
} catch (err) {
|
||||
prompter.warn(`Gateway setup failed: ${err instanceof Error ? err.message : String(err)}`);
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user