Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] copy command path separator #227

Open
Winand opened this issue Sep 4, 2024 · 0 comments
Open

[Windows] copy command path separator #227

Winand opened this issue Sep 4, 2024 · 0 comments

Comments

@Winand
Copy link

Winand commented Sep 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant