Skip to content

Support having the active and staging directories on different drives on Windows #326

Description

@TravisCarden

Due to a quirk of rsync on Windows whereby absolute paths are interpreted as remote URLs (see below), it is impossible to use the same command as on Linux it to sync files between the active and staging directories. The only known alternative at present is to use relative paths from the drive root, but obviously that won't work if the directories are on different drives. It seems to be common practice to put Windows system files (including the temp directory) on the C: drive and web documents on D:, so this scenario seems likely to occur in real life. Consider adding support for it.

$ C:\ProgramData\Chocolatey\bin\rsync.EXE \
    --archive \
    --delete-after \
    --verbose \
    D:\a\composer-stager\composer-stager\var\phpunit\test-env\fresh-fixtures\active-dir\ \
    D:\a\composer-stager\composer-stager\var\phpunit\test-env\fresh-fixtures\staging-dir

The source and destination cannot both be remote.
rsync error: syntax or usage error (code 1) at main.c(1426) [Receiver=3.2.7]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions