mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-16 02:51:10 +00:00
fix(hetzner): add SPAWN_CUSTOM guard to promptServerType (#2065)
Every other cloud provider (GCP, DO, Daytona) gates their size/type picker behind SPAWN_CUSTOM !== "1" so users get a fast default launch. Hetzner's promptLocation had the guard but promptServerType was missing it, causing an unexpected interactive picker on the cheapest/most-used cloud when running without --custom. Bump CLI to 0.11.19. Agent: team-lead Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
902f3091d3
commit
631722151c
3 changed files with 6 additions and 3 deletions
|
|
@ -124,10 +124,9 @@ describe("Hetzner --custom prompts", () => {
|
|||
restoreEnv("HETZNER_LOCATION", savedLocation);
|
||||
});
|
||||
|
||||
it("promptServerType should return default in non-interactive mode", async () => {
|
||||
it("promptServerType should return default without --custom", async () => {
|
||||
delete process.env.HETZNER_SERVER_TYPE;
|
||||
delete process.env.SPAWN_CUSTOM;
|
||||
process.env.SPAWN_NON_INTERACTIVE = "1";
|
||||
const { promptServerType, DEFAULT_SERVER_TYPE } = await import("../hetzner/hetzner");
|
||||
const result = await promptServerType();
|
||||
expect(result).toBe(DEFAULT_SERVER_TYPE);
|
||||
|
|
|
|||
|
|
@ -347,6 +347,10 @@ export async function promptServerType(): Promise<string> {
|
|||
return process.env.HETZNER_SERVER_TYPE;
|
||||
}
|
||||
|
||||
if (process.env.SPAWN_CUSTOM !== "1") {
|
||||
return DEFAULT_SERVER_TYPE;
|
||||
}
|
||||
|
||||
if (process.env.SPAWN_NON_INTERACTIVE === "1") {
|
||||
return DEFAULT_SERVER_TYPE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue