Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/lib/init/wizard-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { formatBanner } from "../banner.js";
import { CLI_VERSION } from "../constants.js";
import { getAuthToken } from "../db/auth.js";
import { terminalLink } from "../formatters/colors.js";
import { guardNonInteractive } from "../mutate-command.js";
import { getSentryBaseUrl } from "../sentry-urls.js";
import { slugify } from "../utils.js";
import {
Expand Down Expand Up @@ -325,9 +326,11 @@ async function preamble(
yes: boolean,
dryRun: boolean
): Promise<boolean> {
if (!(yes || process.stdin.isTTY)) {
try {
guardNonInteractive({ yes, "dry-run": dryRun });
} catch (err) {
process.stderr.write(
"Error: Interactive mode requires a terminal. Use --yes for non-interactive mode.\n"
`Error: ${err instanceof Error ? err.message : "Interactive mode requires a terminal. Use --yes for non-interactive mode."}\n`
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
);
process.exitCode = 1;
return false;
Comment thread
sentry[bot] marked this conversation as resolved.
Expand Down
Loading