@@ -86,23 +86,21 @@ func (*App) token(ctx context.Context) (string, error) {
8686 "/usr/local/bin/gh" , // Homebrew on Intel / manual install
8787 "/usr/bin/gh" , // System package managers
8888 "/opt/local/bin/gh" , // MacPorts
89- "/sw/bin/gh" , // Fink
90- "/nix/var/nix/profiles/default/bin/gh" , // Nix
89+ "/run/current-system/ sw/bin/gh" , // Nix
90+ "/nix/var/nix/profiles/default/bin/gh" , // Nix fallback
9191 }
9292 case "linux" :
9393 homeDir := os .Getenv ("HOME" )
9494 commonPaths = []string {
95- "/usr/local/bin/gh" , // Manual install
96- "/usr/bin/gh" , // System package managers (apt, dnf, etc)
97- "/home/linuxbrew/.linuxbrew/bin/gh" , // Linuxbrew
98- "/snap/bin/gh" , // Snap package
99- "/run/current-system/sw/bin/gh" , // NixOS
100- "/var/lib/flatpak/exports/bin/gh" , // Flatpak system
101- filepath .Join (homeDir , ".local" , "share" , "flatpak" , "exports" , "bin" , "gh" ), // Flatpak user
102- "/usr/local/go/bin/gh" , // Go install
103- filepath .Join (homeDir , "go" , "bin" , "gh" ), // Go install user
104- filepath .Join (homeDir , ".local" , "bin" , "gh" ), // pip/pipx install
105- "/opt/gh/bin/gh" , // Custom installs
95+ "/usr/local/bin/gh" , // Manual install
96+ "/usr/bin/gh" , // System package managers (apt, dnf, etc)
97+ "/home/linuxbrew/.linuxbrew/bin/gh" , // Linuxbrew
98+ "/snap/bin/gh" , // Snap package
99+ "/run/current-system/sw/bin/gh" , // NixOS
100+ "/var/lib/flatpak/exports/bin/gh" , // Flatpak system
101+ "/usr/local/go/bin/gh" , // Go install
102+ filepath .Join (homeDir , "go" , "bin" , "gh" ), // Go install user
103+ "/opt/gh/bin/gh" , // Custom installs
106104 }
107105 default :
108106 // BSD and other Unix-like systems
0 commit comments