Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Path management improvements
Browse files Browse the repository at this point in the history
- Improve path resolution for backup and restore commands
- Closes #8207
SchrodingersGat committed Sep 29, 2024
1 parent 33499d6 commit 495bb0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tasks.py
Original file line number Diff line number Diff line change
@@ -411,6 +411,11 @@ def backup(c, clean=False, path=None):
cmd = '--noinput --compress -v 2'

if path:
# Resolve the provided path
path = Path(path)
if not os.path.isabs(path):
path = localDir().joinpath(path).resolve()

cmd += f' -O {path}'

if clean:
@@ -442,6 +447,11 @@ def restore(
base_cmd = '--noinput --uncompress -v 2'

if path:
# Resolve the provided path
path = Path(path)
if not os.path.isabs(path):
path = localDir().joinpath(path).resolve()

base_cmd += f' -I {path}'

if ignore_database:

0 comments on commit 495bb0b

Please sign in to comment.