Dashboard › craft › Distillation
8c6614be-8224-44bd-be45-1a0200fd5317["lore_tm_v1_G7-FnIKh2qI86MXsCeUWk-qqcU0jYzeSsm9quhC8bmQ"]
Date: Aug 25, 2026
--workspace --dry-run must never be mistaken for a workspace name.src/utils/helpers.ts:24-72 documents and implements extractWorkspaceSelection(argv, env = process.env): it resolves --workspace foo and --workspace=foo from raw argv before yargs builders/config access, using node:util parseArgs() tokenization with options: { workspace: { type: 'string' } }, allowPositionals: true, strict: false, and tokens: true.extractWorkspaceSelection() reads CRAFT_WORKSPACE as fallback (env.CRAFT_WORKSPACE || undefined); among repeated workspace options, the last occurrence wins, while a bare or empty final workspace option clears any earlier CLI selection and falls back to CRAFT_WORKSPACE.src/utils/helpers.ts:62-69 accepts a nonempty workspace token only when token.value is a string and either token.inlineValue is true or the value does not start with -; therefore --workspace=-foo is valid, but --workspace --foo is not treated as a workspace value.src/utils/helpers.ts:8-16 defines MAX_STEP_OUTPUT_BYTES = 64 * 1024; comments state this is below the approximately 2 MB ARG_MAX kernel limit and GitHub’s approximately 65,536-character issue-body limit, to prevent E2BIG errors when GitHub Actions expands step outputs into subsequent-step environment variables.src/utils/helpers.ts:18-22 defines envToBool(envVar) using falsy normalized string values '', 'undefined', 'null', '0', 'false', and 'no'.src/utils/helpers.ts:88-111 initializes global flags as 'dry-run': false, 'no-input': false, and 'log-level': 'Info'; setGlobals() updates only defined values, logs globals/argv, and calls setLevel(LogLevel[GLOBAL_FLAGS['log-level']]); isDryRun() returns the current 'dry-run' flag.src/utils/helpers.ts:113-138 promptConfirmation() prompts “Is everything OK? Type "yes" to proceed:” when input is enabled; validation requires at least 2 characters, only case-insensitive yes proceeds, and any other answer logs “Oh, okay. Aborting.” then exits with status 1. hasInput() returns the inverse of 'no-input'.src/utils/helpers.ts:140-160 setGitHubActionsOutput(name, value) is a no-op without GITHUB_OUTPUT; multiline values use a generated EOF_${Date.now()}_${Math.random().toString(36).slice(2)} heredoc delimiter, while single-line values append ${name}=${value}\n.