diff --git a/constructor/osx/run_installation.sh b/constructor/osx/run_installation.sh index f01e43c5d..9258c12fc 100644 --- a/constructor/osx/run_installation.sh +++ b/constructor/osx/run_installation.sh @@ -112,8 +112,8 @@ fi # This is not needed for the default install to ~, but if the user changes the # install location, the permissions will default to root unless this is done. -chown -R "$USER" "$PREFIX" -chown -R "$USER" "${HOME}/.conda" +chown -R "${USER}" "$PREFIX" +test -d "${HOME}/.conda" && chown -R "${USER}" "${HOME}/.conda" test -f "${HOME}/.condarc" && chown "${USER}" "${HOME}/.condarc" notify "Done! Installation is available in $PREFIX." diff --git a/news/820-test-d-chown b/news/820-test-d-chown new file mode 100644 index 000000000..53cd3d796 --- /dev/null +++ b/news/820-test-d-chown @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Fix a regression in the PKG installers where the installer would fail if `~/.conda` did not exist before trying to fix the directory permissions. (#820) + +### Deprecations + +* + +### Docs + +* + +### Other + +*