dubinc/dub · info

You canceled the prompt.

Error message

You canceled the prompt.

What it means

In the `domains` command, the interactive prompts (clack-style) are given an onCancel handler that prints this warning and exits the process with code 0 when the user aborts a prompt (Ctrl+C or Esc). It is a graceful, user-initiated cancellation message, not an unexpected failure.

Source

Thrown at packages/cli/src/commands/domains.ts:52

      };

      const options = await prompts(
        [
          {
            type: "select",
            name: "domain",
            message: "Select a domain",
            choices: await showDomains(),
            validate: (value) => {
              const result = domainOptionsSchema.shape.slug.safeParse(value);
              return result.success || result.error.errors[0].message;
            },
          },
        ],
        {
          onCancel: () => {
            logger.info("");
            logger.warn("You canceled the prompt.");
            logger.info("");
            process.exit(0);
          },
        },
      );

      setConfig({ domain: options.domain });
      spinner.succeed("Done");

      logger.info("");
      logger.info(`${chalk.green("Success!")} Configuration updated.`);
      logger.info("");
    } catch (error) {
      spinner.stop();
      handleError(error);
    }
  });

View on GitHub (pinned to f216b94a24)

Solutions

  1. No fix needed — this is intentional exit; re-run the `domains` command when ready to complete the prompt.
  2. If cancellations seem unintentional, check terminal keybindings for Esc/Ctrl+C remapping (tmux, IDE terminals).
  3. Avoid pressing Esc; answer or Ctrl+C consciously knowing the command exits with code 0.
Defensive patterns

Strategy: try-catch

Validate before calling

// Detect non-interactive terminals before prompting
if (!process.stdin.isTTY) {
  console.warn('No interactive terminal; pass flags instead of prompts');
  process.exit(1);
}

Try / catch

// clack prompts throw a symbol on cancel — handle it explicitly
const answer = await text({ message: 'Domain name' });
if (clack.isCancel(answer)) {
  console.warn('You canceled the prompt.');
  process.exit(0);
}

Prevention

When it happens

Trigger: Pressing Ctrl+C or Esc while the domain selection/creation prompt in `domains` is displayed.

Common situations: User changes their mind mid-flow, opens the command by accident, or a terminal emulator maps Esc/Ctrl+C unexpectedly (e.g. inside tmux or an IDE terminal).

Related errors


AI-assisted analysis of dubinc/dub@f216b94a24 (2026-08-31). Data as JSON: /api/errors/88dfb47449f125b0. Report an issue: GitHub.