Skip to content

dune exec needs to add .exe on Windows #3322

@dra27

Description

@dra27

dune exec -- foo on Windows needs to consider dune exec -- foo.exe when working out if there is a program to (re)compile. At the moment, the behaviour is mixed:

  • if _build/install/default/bin/foo.exe has previously been built, then you get a potentially stale execution of foo if its sources have changed
  • if _build/install/default/bin/foo.exe hasn't previously been built, then you get an error.

Specifying dune exec -- foo.exe works consistently, but this has two problems:

  • It's surprising on Windows (unless the user has done something really weird with the PATHEXT environment variable)
  • It's not good for a cross-platform set-up since dune exec -- foo.exe will fail on a (Unix) system which installs foo.exe as foo with the executable bit set.

(Dune 2.4.0; Windows mingw32; OCaml 4.08.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    windowsIssues that relate to Dune on Microsoft Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions