Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run() fails on Windows in Git Bash / Cygwin / MSYS environments #34

Open
watsonian opened this issue Oct 17, 2022 · 1 comment
Open

Comments

@watsonian
Copy link

We have a CLI tool that runs code like this:

if err := open.Run(url); err != nil {
  utils.Log("Unable to launch a browser")
  utils.LogDebugError(err)
}

It works fine in Linux, MacOS and in a Windows command prompt. However, it fails when it executes inside Git Bash (which is essentially a MSYS/Cygwin-like environment). The failure message is "Incorrect function".

My suspicion here is that the Windows implementation simply doesn't work in MSYS/Cygwin-style environments. Simply running start $URL in Git Bash opened up a browser as expected. Also, prefixing the command with winpty worked (which is included with Git Bash by default – see https://github.com/rprichard/winpty).

@warisfullstack
Copy link

image

Doppler command is working fin on gitbash terminal and not working in vs code and phpstrom terminal
I'm using window 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants