Skip to content

v1.2.1

Latest

Choose a tag to compare

@pulumi-bot pulumi-bot released this 04 Mar 00:22
· 11 commits to master since this release
7f3eb6f
CopyToRemote: create parent directories as needed (#1161)

## Summary

- Use `MkdirAll` instead of `Mkdir` when creating the destination path
in `CopyToRemote`, so all necessary parent directories are created
automatically (similar to `mkdir -p`)
- Previously, copying to a path like `/a/b/c/file` would fail if `/a/b`
didn't exist
- This applies to all copy modes: file copies, directory copies,
directory content copies, and text asset copies

Fixes #650

## Test plan

- [x] Added unit tests for parent directory creation in all copy modes:
- `copy_file_creates_parent_dirs` - copies a file to a deeply nested
path
- `copy_dir_creates_parent_dirs` - copies a directory to a deeply nested
path
- `copy_dir_contents_creates_parent_dirs` - copies directory contents to
a deeply nested path
- `copy_text_content_creates_parent_dirs` - copies text content to a
deeply nested path
- [x] All existing tests continue to pass (17/17 pass)