mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Only delete existing paths on macOS onedir
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
9a94ec6d6a
commit
42a3080b1d
1 changed files with 4 additions and 3 deletions
|
@ -534,9 +534,10 @@ def salt_onedir(
|
|||
def errfn(fn, path, err):
|
||||
ctx.info(f"Removing {path} failed: {err}")
|
||||
|
||||
shutil.rmtree(onedir_env / "opt", onerror=errfn)
|
||||
shutil.rmtree(onedir_env / "etc", onerror=errfn)
|
||||
shutil.rmtree(onedir_env / "Library", onerror=errfn)
|
||||
for subdir in ("opt", "etc", "Library"):
|
||||
path = onedir_env / subdir
|
||||
if path.exists():
|
||||
shutil.rmtree(path, onerror=errfn)
|
||||
|
||||
# TODO: Fix hardcoded 3.10
|
||||
dest_path = onedir_env / "lib" / "python3.10" / "site-packages" / "extras.pth"
|
||||
|
|
Loading…
Add table
Reference in a new issue