Skip to content

Commit

Permalink
ssh: fix ~ on Docker transport Copy
Browse files Browse the repository at this point in the history
  • Loading branch information
spikecurtis committed Mar 7, 2025
1 parent 36d4929 commit 965fde2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/agent/transport/docker/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ func (t *dockerTransport) Copy(localPath, remoteName string) error {
}
}

// Since we know the home directory via probing, trim ~/ from the remote name
// if it was included.
remoteName = strings.TrimPrefix(remoteName, "~/")

// Compute the path inside the container. We don't bother trimming trailing
// slashes from the home directory, because both Windows and POSIX will work
// in their presence. The only case on Windows where \\ has special meaning
Expand Down

0 comments on commit 965fde2

Please sign in to comment.