Skip to content

Commit af601d8

Browse files
author
Wiktor Maj
authored
Make create_directory() idempotent to support re-runs (#106)
1 parent eef776d commit af601d8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727

2828
* Fixed `run_mysql_server()` not instantiating `MySQLServer` class. (#94)
2929
* Disabled MD060 markdownlint rule to fix table column style false positives in documentation. (#94)
30+
* Made `create_directory()` idempotent to support deployment re-runs. (#35)
3031
* Added default inventory directive to `ansible.cfg`. (#42)
3132
* Fixed Publish workflow `write_package` permission denied by adding OCI source labels for GHCR repository linking. (#99)
3233

src/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def upload_directory(self, local_directory_path: str, remote_directory_path: str
152152
self.sftp_client.put(local_item_path, remote_item_path)
153153

154154
def create_directory(self, remote_directory_path: str) -> None:
155-
self.sftp_client.mkdir(remote_directory_path)
155+
self.ssh_client.exec_command(f"mkdir -p {remote_directory_path}")
156156

157157
def upload_file(self, content: str | bytes, remote_file_path: str) -> None:
158158
if isinstance(content, str):

0 commit comments

Comments
 (0)