{"record":{"id":"90ea5d3120372913","repo":"jdx/mise","slug":"not-connected-choose-sync-manual-sync-sync","errorCode":null,"errorMessage":"not connected: choose --sync manual, --sync sync, or --sync fetch-only to connect without a mode prompt","messagePattern":"not connected: choose --sync manual, --sync sync, or --sync fetch-only to connect without a mode prompt","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/origin.rs","lineNumber":95,"sourceCode":"    }\n}\n\nimpl DotfilesOriginSet {\n    async fn run(self) -> Result<()> {\n        if !crate::config::Settings::get().history.enabled {\n            bail!(\"history is disabled (history.enabled = false)\");\n        }\n        let mode = match self.sync.as_deref() {\n            Some(mode) => SyncMode::parse(mode)?,\n            None if self.yes || crate::config::Settings::get().yes => SyncMode::current()?,\n            None => match crate::ui::prompt::confirm_with_default(\n                \"Automatically publish saved edits AND apply incoming changes to live files? Choose no for manual sharing; local autosave continues in either mode.\",\n                false,\n            )? {\n                crate::ui::prompt::Confirmation::Yes => SyncMode::Sync,\n                crate::ui::prompt::Confirmation::No => SyncMode::Manual,\n                crate::ui::prompt::Confirmation::Unavailable => {\n                    bail!(\n                        \"not connected: choose --sync manual, --sync sync, or --sync fetch-only to connect without a mode prompt\"\n                    );\n                }\n            },\n        };\n        let (store, tracked, _) = super::history::open().await?;\n        if let Some(reason) = store.unavailable() {\n            bail!(\"cannot connect a setup repository: {reason}\");\n        }\n        origin::set(\n            &store,\n            &tracked,\n            &origin::SetOptions {\n                url: self.url.clone(),\n                branch: self.branch.clone(),\n                mode,\n                yes: self.yes,\n            },","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/dotfiles/origin.rs#L77-L113","documentation":"This error is thrown by `mise bootstrap dotfiles origin` (run) when the sync-mode interactive prompt cannot be answered (stdin unavailable or non-interactive terminal) and the user selected no explicit --sync mode. mise refuses to silently pick a mode for publishing/applying dotfile changes, so it aborts with guidance to pass the mode on the command line.","triggerScenarios":"Running `mise bootstrap dotfiles origin` without --sync in a non-interactive environment (CI, script, piped stdin) so crate::ui::prompt::Confirmation::Unavailable is returned from the sync-mode confirmation prompt.","commonSituations":"CI pipelines or shell scripts invoking the origin connect command without a TTY; users piping input into mise; IDE terminals where the prompt library cannot read confirmation.","solutions":["Re-run with an explicit mode: `mise bootstrap dotfiles origin --sync sync` to publish and apply","Use `--sync manual` to only publish saved edits without applying incoming changes","Use `--sync fetch-only` if supported, to only receive incoming changes","Run the command interactively in a real TTY so the prompt can be answered"],"exampleFix":"// before\nmise bootstrap dotfiles origin git@github.com:me/dotfiles.git\n// after\nmise bootstrap dotfiles origin --sync sync git@github.com:me/dotfiles.git","handlingStrategy":"validation","validationCode":"# Non-interactive callers must pass --sync explicitly\nif [ ! -t 0 ]; then\n  SYNC_FLAG=\"--sync sync\"   # or manual / fetch-only\nelse\n  SYNC_FLAG=\"\"\nfi\nmise bootstrap dotfiles origin $SYNC_FLAG \"$REMOTE_URL\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --sync when invoking dotfiles origin from scripts or CI","Check for a TTY (-t 0) before relying on interactive prompts","Encode the chosen sync mode in your dotfiles bootstrap script"],"tags":["cli","dotfiles","non-interactive","missing-flag"],"backgroundTag":"missing-required-flag","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}