Skip to content

Git not working with fish + MacOS 12.4 #9052

@jenklu-copia

Description

@jenklu-copia

Please tell us which fish version you are using by executing the following:

🍏 fish --version
fish, version 3.5.0

Please tell us which operating system and terminal you are using. The output of uname -a and echo $TERM may be helpful in this regard although other commands might be relevant in your specific situation.

lucasjenkins@lucas-mbp ~/c/device-agent 🍏 uname -a
Darwin lucas-mbp.lan 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~/c/device-agent 🍏 echo $TERM
xterm-256color
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86

Please tell us if you tried fish without third-party customizations by executing this command and whether it affected the behavior you are reporting:

lucasjenkins@lucas-mbp ~/c/device-agent 🍏 sh -c 'env HOME=$(mktemp -d) fish'
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp /U/l/c/device-agent 🍏 git sexec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp /U/l/c/device-agent 🍏 git status
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86

No, this did not affect the behavior I am reporting

Tell us how to reproduce the problem.

I recently obtained a new M1 MacBook Pro

  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro18,1
  Chip:	Apple M1 Pro
  Total Number of Cores:	10 (8 performance and 2 efficiency)
  Memory:	16 GB
  System Firmware Version:	7459.121.3
  OS Loader Version:	7459.121.3

In the process of setting up my dev environment, I set up HomeBrew, downloaded fish and set it as my default shell, and updated my MacOS to Monterey (12.4). After updating, I noticed that for every command I ran, I got a

exec: Failed to execute process '/usr/local/bin/git', unknown error number 86

line after the command output. I suspected the fish_prompt function was the issue, and after digging in, it became clear that the fish_git_prompt was the thing trying to execute git at every prompt. More concerningly, trying to just git from the prompt displayed the same error.

I'm hesitant to even file this bug against fish, but I only do so because I'm not seeing the same problems with the default zsh install on the Macbook, per the following shell transactions:

lucasjenkins@lucas-mbp ~ 🍏 ls
Applications/ Desktop/      Documents/    Downloads/    Library/      Movies/       Music/        Pictures/     Public/       code/
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~ 🍏 git
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~ [126] 🍏 echo $PATH
/opt/homebrew/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/munki
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~ 🍏 which git
/usr/local/bin/git
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~ 🍏 zsh
Restored session: Fri Jul  1 19:32:44 EDT 2022
lucasjenkins@lucas-mbp ~ % ls
Applications	Desktop		Documents	Downloads	Library		Movies		Music		Pictures	Public		code
lucasjenkins@lucas-mbp ~ % git
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:

<...some git usage output omitted, but it's clear that the git executable works>

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
lucasjenkins@lucas-mbp ~ % echo $PATH
/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki
lucasjenkins@lucas-mbp ~ % which git
/usr/local/bin/git
lucasjenkins@lucas-mbp ~ % 

Saving session...
...saving history...truncating history files...
...completed.
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86
lucasjenkins@lucas-mbp ~ 🍏 
exec: Failed to execute process '/usr/local/bin/git', unknown error number 86

If you need anything else from me please ask, or if you feel confident this is not a fish issue I won't be offended if you close out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    macosmacOS-specific issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions