{"record":{"id":"60554e542877587b","repo":"tauri-apps/tauri","slug":"you-did-not-select-any-capabilities-to-update","errorCode":null,"errorMessage":"You did not select any capabilities to update","messagePattern":"You did not select any capabilities to update","errorType":"exception","errorClass":"Error::GenericError","httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/acl/permission/add.rs","lineNumber":250,"sourceCode":"        options.identifier\n      ),\n      capabilities\n        .iter()\n        .map(|(c, p)| {\n          let id = c.identifier();\n          if id.is_empty() {\n            dunce::simplified(p).to_str().unwrap_or_default()\n          } else {\n            id\n          }\n        })\n        .collect::<Vec<_>>()\n        .as_slice(),\n      None,\n    )?;\n\n    if selections.is_empty() {\n      crate::error::bail!(\"You did not select any capabilities to update\");\n    }\n\n    selections\n      .into_iter()\n      .map(|idx| capabilities[idx].clone())\n      .collect()\n  } else {\n    capabilities\n  };\n\n  if capabilities.is_empty() {\n    crate::error::bail!(\"Could not find a capability to update\");\n  }\n\n  for (capability, path) in &mut capabilities {\n    if capability.has_permission(&options.identifier) {\n      log::info!(\n        \"Permission `{}` already found in `{}` at {}\",","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/acl/permission/add.rs#L232-L268","documentation":"`tauri permission add` shows an interactive multi-select prompt when more than one capability file exists and no `--capability` argument was passed. If you confirm the prompt with zero entries selected, the CLI aborts with this message rather than silently modifying nothing.","triggerScenarios":"Running `tauri permission add <id>` in a project with multiple files under `capabilities/` and pressing Enter without first toggling entries with Space; or running in a pseudo-terminal/CI context where the multiselect prompt resolves to an empty selection.","commonSituations":"Developers unfamiliar with multiselect keybindings (Space toggles, Enter confirms); scripts or CI that hit the interactive branch because `--capability` was omitted.","solutions":["Re-run the command and press Space on at least one capability before pressing Enter","Skip the prompt entirely by passing the capability explicitly: `tauri permission add <id> --capability <capability-identifier>`","In scripts/CI, always pass `--capability` so the interactive branch is never reached"],"exampleFix":"# before\nchmod +x . ; tauri permission add fs:allow-read-text-file\n# after\ntauri permission add fs:allow-read-text-file --capability default","handlingStrategy":"validation","validationCode":"# enumerate capability identifiers first, then pass one explicitly\nids=$(grep -h '\"identifier\"' src-tauri/capabilities/*.json 2>/dev/null | sed 's/.*: *\"\\([^\"]*\\)\".*/\\1/')\n[ -n \"$ids\" ] || { echo 'no capabilities found'; exit 1; }\ntauri permission add fs:default --capability $(echo \"$ids\" | head -n1)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass `--capability <id>` when scripting or in CI — prompts cannot be answered there anyway","Maintain a single capability file in small projects so the multiselect never appears","Remember the prompt keybinding: Space toggles, Enter confirms"],"tags":["tauri-cli","acl","interactive-prompt","capabilities","user-input"],"backgroundTag":"empty-prompt-selection","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}