Skip to content

v3 regression over v2: opam exec now fails with "Exec format error" on shell scripts on Windows #866

Closed as not planned
@JasonGross

Description

@JasonGross
opam exec -- ./test.sh
Fatal error: exception C:\hostedtoolcache\windows\opam\2.2.1\x86_64\opam.exe: "create_process" failed on ./test.sh: Exec format error

https://github.com/JasonGross/test/actions/runs/10953316111/job/30413386004

logs_28625164728.zip

Full yml file
name: Example Workflow

on: [push, pull_request]

jobs:
  build:

    runs-on: windows-latest
    name: build
    steps:
    - uses: actions/checkout@v4
      with:
        submodules: recursive
    - uses: ocaml/setup-ocaml@v3
      with:
        ocaml-compiler: 4.13.1
    - run: opam exec -- chmod +x test.sh
    - run: opam exec -- cat test.sh
    - run: opam exec -- ./test.sh


  buildv2:

    runs-on: windows-latest
    name: buildv2
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - uses: ocaml/setup-ocaml@v2
      with:
        ocaml-compiler: 4.13.1
    - run: opam exec -- chmod +x test.sh
    - run: opam exec -- cat test.sh
    - run: opam exec -- ./test.sh

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedupstream

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions