Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Windows] copy command path separator #227

@Winand

Description

@Winand

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions