Skip to content

Commit

Permalink
Do not write directly into /root
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoesters committed Nov 14, 2024
1 parent 684640c commit 615b96c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ def test_uninstallation_remove_condarcs(
check=True,
text=True,
)
mock_system_paths["confighome"] = Path(proc.stdout.strip())
user_condarc = mock_system_paths["confighome"] / ".condarc"
homedir = Path(proc.stdout.strip())
mock_system_paths["confighome"] = homedir
user_condarc = homedir / ".config" / ".conda" / ".condarc"

for condarc_file in (system_condarc, user_condarc):
if needs_sudo:
Expand Down Expand Up @@ -394,7 +395,7 @@ def test_uninstallation_remove_condarcs(
finally:
system_conda_dirs = [system_condarc.parent]
if needs_sudo:
system_conda_dirs.append(mock_system_paths["confighome"] / ".condarc")
system_conda_dirs.append(mock_system_paths["confighome"] / ".config")
for system_dir in system_conda_dirs:
if not system_dir.exists():
continue
Expand Down

0 comments on commit 615b96c

Please sign in to comment.