{"record":{"id":"a4ea991751e30757","repo":"microsoft/playwright","slug":"only-one-of-no-shell-and-only-shell-can-be-spe","errorCode":null,"errorMessage":"Only one of --no-shell and --only-shell can be specified","messagePattern":"Only one of --no-shell and --only-shell can be specified","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/cli/installActions.ts","lineNumber":114,"sourceCode":"      `installing your project's dependencies.`,\n      ``,\n      `To avoid unexpected behavior, please install your dependencies first, and`,\n      `then run Playwright's install command:`,\n      ``,\n      `    npm install`,\n      `    npx playwright install`,\n      ``,\n      `If your project does not yet depend on Playwright, first install the`,\n      `applicable npm package (most commonly @playwright/test), and`,\n      `then run Playwright's install command to download the browsers:`,\n      ``,\n      `    npm install @playwright/test`,\n      `    npx playwright install`,\n      ``,\n    ].join('\\n'), 1));\n  }\n  if (options.shell === false && options.onlyShell)\n    throw new Error(`Only one of --no-shell and --only-shell can be specified`);\n  const shell = options.shell === false ? 'no' : options.onlyShell ? 'only' : undefined;\n  const executables = registry.resolveBrowsers(args, { shell });\n  if (options.withDeps)\n    await registry.installDeps(executables, !!options.dryRun);\n  if (options.dryRun && options.list)\n    throw new Error(`Only one of --dry-run and --list can be specified`);\n  if (options.dryRun) {\n    for (const executable of executables) {\n      console.log(registry.calculateDownloadTitle(executable));\n      console.log(`  Install location:    ${executable.directory ?? '<system>'}`);\n      if (executable.downloadURLs?.length) {\n        const [url, ...fallbacks] = executable.downloadURLs;\n        console.log(`  Download url:        ${url}`);\n        for (let i = 0; i < fallbacks.length; ++i)\n          console.log(`  Download fallback ${i + 1}: ${fallbacks[i]}`);\n      }\n      console.log(``);\n    }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/cli/installActions.ts#L96-L132","documentation":"Thrown by the `playwright install` command when both --no-shell (skip installing shell/python bindings) and --only-shell (install ONLY shell bindings) are passed. The flags describe mutually exclusive install scopes, so the second condition (`options.shell === false && options.onlyShell`) makes the intent ambiguous.","triggerScenarios":"Running `npx playwright install --no-shell --only-shell`, or a wrapper script/CI matrix that concatenates both flags. The check fires only when --no-shell is explicitly false-set and --only-shell is truthy together.","commonSituations":"Cargo-culted install scripts in CI YAML that accumulate flags over time, or shell aliases that hardcode one flag while a developer adds the other on the command line.","solutions":["Pick one scope: `npx playwright install --only-shell` to install shell bindings only.","Or `npx playwright install --no-shell` to install browsers without shell bindings.","Audit CI/playwright install invocations for duplicated/contradictory flags."],"exampleFix":"// before\nnpx playwright install --no-shell --only-shell\n// after\nnpx playwright install --only-shell","handlingStrategy":"validation","validationCode":"if (args.includes('--no-shell') && args.includes('--only-shell'))\n  throw new Error('Choose one: --no-shell OR --only-shell');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep install flag sets in a single CI config rather than layering aliases.","Document the install scopes so contributors don't combine them."],"tags":["cli","install","flag-conflict"],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}