SSH Windows Fix (#894)

Only affects windows builds:

Previously, the ~/.waveterm/bin had to exist for wsh to be installed
properly. This fixes it to work on a remote machine where that isn't
already set up.
This commit is contained in:
Sylvie Crowe 2024-09-27 16:41:53 -07:00 committed by GitHub
parent 267e40cc67
commit e84f07fa13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,8 +254,10 @@ func CpHostToRemote(client *ssh.Client, sourcePath string, destPath string) erro
selectedTemplateRaw = installTemplateRawDefault
}
// I need to use toSlash here to force unix keybindings
// this means we can't guarantee it will work on a remote windows machine
var installWords = map[string]string{
"installDir": filepath.Dir(destPath),
"installDir": filepath.ToSlash(filepath.Dir(destPath)),
"tempPath": destPath + ".temp",
"installPath": destPath,
}