From c49fb31574e141ed949e8a58bb9aedb140a33164 Mon Sep 17 00:00:00 2001 From: Sergey Shirokov Date: Fri, 31 May 2024 10:09:15 +0500 Subject: [PATCH] Add 'system.chown' call to 'cruft.create_project' To grant access for current user to remove temporary folder --- CHANGELOG.md | 3 +++ saritasa_invocations/cruft.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d071bf0..834c9a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ We follow [Semantic Versions](https://semver.org/). ## unreleased +- Add call of `system.shown` in `cruft.create_project` to grant access for current user to remove +temporary folder with test project. + ## 1.1.1 - Make default for `default_entry` for `K8SDefaultSettings` use absolute path diff --git a/saritasa_invocations/cruft.py b/saritasa_invocations/cruft.py index c1752d4..4641596 100644 --- a/saritasa_invocations/cruft.py +++ b/saritasa_invocations/cruft.py @@ -3,7 +3,7 @@ import invoke -from . import _config, printing +from . import _config, printing, system @invoke.task @@ -53,6 +53,7 @@ def create_project( config = _config.Config.from_context(context) tmp_folder = config.cruft.project_tmp_folder printing.print_success(f"Recreating tmp ({tmp_folder}) folder") + system.chown(context) context.run(f"rm -rf {tmp_folder}") context.run(f"mkdir -p {tmp_folder}") with context.cd(tmp_folder):