Closed hetong07 closed 3 years ago
When ssh to a windows machine, the Detect() will return powershell.exe rather than powershell. It is due to the fact that the os.getenv() returns the absolute path to powershell rather then an empty string, which causes this issue.
Detect()
os.getenv()
fmt.Printf("%v\n",os.Getenv("SHELL")) c:\windows\system32\windowspowershell\v1.0\powershell.exe
Description
When ssh to a windows machine, the
Detect()
will return powershell.exe rather than powershell. It is due to the fact that theos.getenv()
returns the absolute path to powershell rather then an empty string, which causes this issue.Related issue(s)
Description
Related issue(s)