spot icon indicating copy to clipboard operation
spot copied to clipboard

[Windows] copy command path separator

Open Winand opened this issue 1 year ago • 0 comments

I run spot on Windows. I've tried to copy a file to a subfolder in user home directory. That works if I use relative remote path like ./wg-easy/docker-compose.yml.

But with an absolute path mkdir tries to create a folder with Windows backslash separator, e.g. in this case

user: myuser
ssh_key: ~\.ssh\id_ed25519
targets: ["my-host.com:22"]

task:
  - name: copy
    copy: {
      "src": "./my-host.com/wg-easy/docker-compose.yml",
      "dst": "/home/{SPOT_REMOTE_USER}/wg-easy/docker-compose.yml",
      "mkdir": true
    }

It gives an error [0] failed command "copy" on host my-host.com:22 (): can't copy file to my-host.com:22: failed to create remote file: file does not exist but a folder named \home\myuser\wg-easy is created inside user homedir.

Winand avatar Sep 04 '24 07:09 Winand