Skip to content

Bug: Codex on PowerShell attempts to run sh #316

Closed

Description

@PramaYudhistira

What version of Codex is running?

v0.1.2504172351

Which model were you using?

o4-mini

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What steps can reproduce the bug?

  • Run npm i -g @openai/codex
  • Run codex

It will output

& : The term 'sh.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again.

What is the expected behavior?

Expected behavior is for codex cli to start running properly. This PR shows the expected behavior #318

What do you see instead?

A message indicating the powershell shim codex.ps1 is attempting to run sh.exe. This shouldn't be happening because

Additional information

Added a potential fix here #318 , this change now provides cross-platform support and works on all CLIs by using a Node based entry point

Activity

  1. added
    bug
    on Apr 18, 2025
  2. PramaYudhistira commented on Apr 18, 2025

    @PramaYudhistira
    ContributorAuthor

    Image

  3. changed the title [-]Codex on Powershell is attempts to run `sh`[/-] [+]Codex on Powershell attempts to run `sh`[/+] on Apr 18, 2025
  4. changed the title [-]Codex on Powershell attempts to run `sh`[/-] [+]Codex on PowerShell attempts to run `sh`[/+] on Apr 18, 2025
  5. changed the title [-]Codex on PowerShell attempts to run `sh`[/-] [+]Bug: Codex on PowerShell attempts to run `sh`[/+] on Apr 18, 2025
  6. PramaYudhistira commented on Apr 18, 2025

    @PramaYudhistira
    ContributorAuthor

    I have a fix for this here #318 to provide cross-platform support

  7. gitmeatarru commented on Apr 19, 2025

    @gitmeatarru

    we waiting update, coz its still not working...

  8. PramaYudhistira commented on Apr 19, 2025

    @PramaYudhistira
    ContributorAuthor

    we waiting update, coz its still not working...

    It hasn't been uploaded to npm yet. If you clone the repo and have this running locally instead of getting it from npm you will have all the recent commits.

    @gitmeatarru

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions