From e84f07fa13842c71cc3b41d4feb0184bfd0bb824 Mon Sep 17 00:00:00 2001 From: Sylvie Crowe <107814465+oneirocosm@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:41:53 -0700 Subject: [PATCH] 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. --- pkg/remote/connutil.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/remote/connutil.go b/pkg/remote/connutil.go index 2dcd64a9c..dd5f63695 100644 --- a/pkg/remote/connutil.go +++ b/pkg/remote/connutil.go @@ -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, }