gow icon indicating copy to clipboard operation
gow copied to clipboard

GNU which v2.20 from gow v0.8.0 cannot find "C:\Windows\System32\OpenSSH\ssh.exe"

Open sebma opened this issue 1 year ago • 2 comments

Hi,

GNU which v2.20 from gow v0.8.0 cannot find C:\Windows\System32\OpenSSH\ssh.exe :

> C:\ProgramData\scoop\apps\gow\0.8.0\bin\which.exe -v
GNU which v2.20, Copyright (C) 1999 - 2008 Carlo Wood.
GNU which comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.
> C:\ProgramData\scoop\apps\gow\0.8.0\bin\which.exe ssh
C:\ProgramData\scoop\apps\gow\0.8.0\bin\which.exe: no ssh in (.;C:\ProgramData\scoop\apps\gsudo\current;C:\ProgramData\scoop\shims;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\Users\sebastien.mansfeld\AppData\Local\Microsoft\WindowsApps)

Although C:\Windows\System32\OpenSSH it is in the PATH variable :

> $env:path -split ';' -match "ssh"
C:\windows\System32\OpenSSH

But the whereis.bat tool finds it :

> C:\ProgramData\scoop\apps\gow\0.8.0\bin\whereis.bat ssh
C:\Windows\System32\OpenSSH\ssh.exe

However which works fine with other arguments :

> C:\ProgramData\scoop\apps\gow\0.8.0\bin\which.exe where which choco
C:\windows\system32\where.EXE
C:\ProgramData\scoop\shims\which.EXE
C:\ProgramData\chocolatey\bin\choco.EXE

And the PATH variable is :

> $env:path -split ';'
C:\ProgramData\scoop\apps\gsudo\current
C:\ProgramData\scoop\shims
C:\windows\system32
C:\windows
C:\windows\System32\Wbem
C:\windows\System32\WindowsPowerShell\v1.0\
C:\windows\System32\OpenSSH
C:\ProgramData\chocolatey\bin
C:\Users\sebastien.mansfeld\AppData\Local\Microsoft\WindowsApps

>

sebma avatar Aug 18 '22 14:08 sebma

Seconded; which is broken.

BrBill avatar Feb 15 '23 01:02 BrBill

I have a working which implementation written from scratch in C.

lm8 avatar Sep 09 '23 19:09 lm8