File provisioner to copy folders to Windows using SSH inconsistent behaviour
- Dominant language
- Go
- Stars
- 15.8k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
#### Overview of the Issue
Using the file provisioner to copy folders containing subfolders and files into a windows machine using SSH is behaving inconsistant.
It is not copying the folders recursive, simply hangs after the first subfolder, or works great
- From windows to windows, using SSH
- HCL defined code
#### Reproduction Steps
1. Absolute source and destination
```
provisioner "file" {
// No trailing slashes on both folders - will stop the copy at subfolders
destination = "c:/temp/build/Horizon-Agents"
source = "e:/Horizon-ClientSoftware/Horizon-Agents"
timeout = "1h"
}
```
- If using slashes at the end of source and destination it only copies the files in the root of source and then hangs.
- If NOT using slashes at the end of source and destination, it works flawless.
- The exception is however that the workings do not follow the documentation on [Packer Docs](https://www.packer.io/docs/provisioners/file#directory-uploads) in regard to the ending /'s
2. relative source and absolute destination
```
provisioner "file" {
// No trailing slashes on both folders - will stop the copy at subfolders
destination = "c:/temp/build/Horizon-Agents"
source = "./Horizon-ClientSoftware/Horizon-Agents"
timeout = "1h"
}
```
- Unable to get this working. Hangs after first subfolder of source stated in packer.log. No files copied.
- Still working on this one
### Packer version
Packer v1.7.10
### Operating system and Environment details
Packer server is Server 2019
Windows OS is W10 20H2,21H2, W11 21H2, Server 2019
### Log Fragments and crash.log files
Still gathering evidence...
Contributor guide
Assessment
This issue has not been assessed yet.