Skip to content

Strip leading backslashes from AppSpec paths on Windows - #425

Merged
gmiliaras merged 1 commit into
mainfrom
2.0.x
Sep 9, 2026
Merged

Strip leading backslashes from AppSpec paths on Windows#425
gmiliaras merged 1 commit into
mainfrom
2.0.x

Conversation

@gmiliaras

Copy link
Copy Markdown
Contributor

Issue #, if available: N/A

Description of changes:

On Windows, a leading \ in an AppSpec files.source or hooks.location was treated as a filesystem root, so PathBuf::join discarded the archive directory and resolved the path against the drive root (C:\), failing deployments. Strip all leading separators (/ and, on Windows, \) so these paths always resolve inside the deployment archive.

Note: on Unix, a source like //app previously escaped to the filesystem root; it now resolves inside the archive.

Bumps the agent version to 2.0.1.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

On Windows the "\" separator in an AppSpec files.source or hooks.location
was treated as a filesystem root, so PathBuf::join discarded the archive
directory and resolved the path to the drive root. Strip every leading
separator via paths::APPSPEC_PATH_SEPARATORS (['/', '\\'] on Windows,
['/'] on Unix) so such paths always resolve inside the deployment archive.

Bump agent version to 2.0.1
@gmiliaras
gmiliaras marked this pull request as ready for review September 9, 2026 07:59
@gmiliaras
gmiliaras merged commit 090fbc9 into main Sep 9, 2026
9 checks passed
@gmiliaras
gmiliaras deleted the 2.0.x branch September 9, 2026 08:30
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

Successfully merging this pull request may close these issues.

3 participants