{"record":{"id":"652b2cfdcf414f86","repo":"jdx/mise","slug":"dp-is-not-executable","errorCode":null,"errorMessage":"`{dp}` is not executable. {}","messagePattern":"`(.+?)` is not executable\\. (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/run.rs","lineNumber":1473,"sourceCode":"                \"2026.8.14\",\n                \"2027.8.14\",\n                \"task.rust_cache\",\n                \"`rust_cache` no longer enables Rust action caching in mise; remove it and run Cargo through mbx instead: https://mr-boxington.jdx.dev/getting-started\"\n            );\n        }\n        if !task.pass_through_env.is_empty() {\n            Settings::get().ensure_experimental(\"task environment pass-through\")?;\n        }\n        if let Some(path) = &task.file\n            && path.exists()\n            && !file::is_executable(path)\n        {\n            let dp = crate::file::display_path(path);\n            // Only offer the fix where accepting it can change the answer. `make_executable` is a\n            // no-op on Windows, so the prompt would take a \"yes\" and then fail anyway; the same\n            // reasoning already keeps `make_task_executable` from running there.\n            if cfg!(windows) {\n                bail!(\n                    \"`{dp}` is not executable. {}\",\n                    file::make_executable_hint(path)\n                )\n            }\n            let msg = format!(\"Script `{dp}` is not executable. Make it executable?\");\n            if ui::confirm(msg)?.is_yes() {\n                file::make_executable(path)?;\n            } else {\n                bail!(\n                    \"`{dp}` is not executable. {}\",\n                    file::make_executable_hint(path)\n                )\n            }\n        }\n        Ok(())\n    }\n\n    fn timings(&self) -> bool {","sourceCodeStart":1455,"sourceCodeEnd":1491,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/run.rs#L1455-L1491","documentation":"Before running a task whose command is a script file, validate_task checks the file is executable. On Windows, mise cannot offer to chmod the file (make_executable is a no-op there), so instead of prompting it immediately fails and tells the user how to fix permissions themselves.","triggerScenarios":"Running `mise run <task>` on Windows where the task's script file lacks the executable bit / is not runnable, and mise would otherwise have offered to make it executable.","commonSituations":"Scripts committed to git without the executable bit (common when developing on Windows or after zips/copies that drop the mode); checking out repos on filesystems that don't preserve modes.","solutions":["Set the executable bit in git: `git update-index --chmod=+x path/to/script` and commit","Fix the file mode on a Unix checkout before syncing to Windows","Configure git: `git config core.fileMode true` so mode changes propagate"],"exampleFix":"// before (Unix dev machine, mode lost on Windows checkout)\n-rw-r--r-- scripts/build.sh\n// after\ngit update-index --chmod=+x scripts/build.sh && git commit -m \"chore: mark build.sh executable\"","handlingStrategy":"validation","validationCode":"[ -x \"$SCRIPT\" ] || git update-index --chmod=+x \"$SCRIPT\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Commit scripts with the executable bit via git update-index --chmod=+x","Enable core.fileMode in git configs for the repo","Ensure zip/transfer processes preserve file modes"],"tags":["tasks","executable-bit","windows","script","permissions"],"backgroundTag":"permission-denied","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}