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

help function tries to execute cmd.exe on Linux #6797

Closed
alex-fu27 opened this issue Mar 23, 2020 · 0 comments
Closed

help function tries to execute cmd.exe on Linux #6797

alex-fu27 opened this issue Mar 23, 2020 · 0 comments
Milestone

Comments

@alex-fu27
Copy link

I am using fish, version 3.1.0 on Arch Linux. It is a dual boot setup with Windows 10. The Windows partition is mounted on /mnt/c.

When I run help, the following happens:

alex@alexnb ~> sh -c 'env HOME=$(mktemp -d) LANG= fish'                                                                                                                    
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
alex@alexnb /h/alex> help
Failed to execute process '/mnt/c/Windows/System32/cmd.exe'. Reason:
exec: Exec format error
The file '/mnt/c/Windows/System32/cmd.exe' is marked as an executable but could not be run by the operating system.
alex@alexnb /h/alex [125]>

The problem is caused by line 80 in help.fish:

if not type -q cygstart
    and set -l cmd (command -s cmd.exe /mnt/c/Windows/System32/cmd.exe)
    # Use the first of these.
    set fish_browser $cmd[1]
end

As this path exists on my system and is marked as executable, fish_browser will be set to that path.

I will work around it by setting the BROWSER variable.

@krobelus krobelus added this to the fish 3.2.0 milestone Mar 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants