T16: on Windows a shell named without an extension means its .exe, and one with an extension keeps it; the resolver hands the session its program as UTF-8 text, so a program whose path is not UTF-8 never saves
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 9m40s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 21:53:24 -04:00
1 parent 3c51b01955
commit 9e69288956
4 files changed
+94 -42

No files matched your search

+1 -5
View File
@@ -78,11 +78,7 @@ pub fn launch(shell: &str, cwd: PathBuf, dir: &Path) -> anyhow::Result<Launch> {
default_shell()?
} else {
// The settings checked this path; the session runs no other.
let found = crate::settings::program_path(shell)
.with_context(|| format!("shell integration: {shell:?} names no program"))?;
(found.to_str())
.with_context(|| format!("shell integration: {} is not UTF-8", found.display()))?
.to_string()
crate::settings::program_path(shell).context("shell integration")?
};
let name = Path::new(&path)
.file_stem()
+1
View File
@@ -251,6 +251,7 @@ fn powershell_reports_its_folder_byte_for_byte_and_keeps_the_status() {
fn a_shell_named_bare_runs_from_its_full_path() {
let started = launch("sh", PathBuf::from("/"), Path::new("/nonexistent")).expect("a launch");
let (program, _) = started.program.expect("a program");
assert_eq!(program, crate::settings::program_path("sh").expect("sh"));
assert!(Path::new(&program).is_absolute(), "{program}");
assert!(launch("no-such-shell", PathBuf::from("/"), Path::new("/")).is_err());
}