Skip to content

CopyToRemote path structure on Windows #888

@svaraborut

Description

@svaraborut

Describe what happened

The resource provider code CopyToRemote does not take in consideration the non-posix path structure in Windows, resulting in files being copied into the remote host user home ~ with names such as literally '\install.sh' or '\scripts\install.sh'.

Pulumi version v3.191.0

Sample program

Run on Windows

copy_files = command.remote.CopyToRemote(
    ...
    source=pulumi.FileArchive('./scripts/'),
    remote_path='/scripts',
    ...
)

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI          
Version      3.191.0
Go Version   go1.25.0
Go Compiler  gc

Plugins
KIND      NAME     VERSION
resource  command  1.1.0
resource  hcloud   1.24.0
language  python   3.191.0
resource  time     0.1.1
resource  tls      5.2.1

Host
OS       Microsoft Windows 11 Pro
Version  10.0.26100 Build 26100
Arch     x86_64

Additional context

No response

Contributing

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueStart here if you'd like to start contributing to Pulumikind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions