Skip to content

Windows regression: can no longer run batch files without extension #6270

@rgwood

Description

@rgwood

Describe the bug

This change of mine caused a regression on Windows: #6253

It's no longer possible to run a batch script named foo.bat or foo.cmd by typing foo without the file extension. Previously this worked because we would always fall back to cmd.exe if a command could not be run as a normal executable.

I should be able to fix this up in the next week (hopefully the next few days), using our existing which dependency. I'll also add tests to make sure this doesn't regress again.

How to reproduce

Try to run foo in a directory with a foo.cmd batch script:

image

Expected behavior

Running foo should run a script named foo.cmd or foo.bat in the PWD or PATH.

Screenshots

No response

Configuration

key value
version 0.66.3
branch
commit_hash 1ba5b25
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.62.1 (e092d0b6b 2022-07-16)
rust_channel stable-x86_64-pc-windows-msvc
cargo_version cargo 1.62.1 (a748cf5a3 2022-06-08)
pkg_version 0.66.3
build_time 2022-08-06 11:21:28 -07:00
build_rust_channel release
features database, default, trash, which, zip
installed_plugins

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions