Skip to content

Commit

Permalink
Add 'system.chown' call to 'cruft.create_project'
Browse files Browse the repository at this point in the history
To grant access for current user to remove temporary folder
  • Loading branch information
Sergey Shirokov committed May 31, 2024
1 parent adfebfc commit c49fb31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion saritasa_invocations/cruft.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import invoke

from . import _config, printing
from . import _config, printing, system


@invoke.task
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit c49fb31

Please sign in to comment.