Skip to content

Commit f70c789

Browse files
authored
Only chown ~/.conda if it exists (#820)
* Only chown ~/.conda if it exists * add news
1 parent b49a2f7 commit f70c789

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

constructor/osx/run_installation.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ fi
112112

113113
# This is not needed for the default install to ~, but if the user changes the
114114
# install location, the permissions will default to root unless this is done.
115-
chown -R "$USER" "$PREFIX"
116-
chown -R "$USER" "${HOME}/.conda"
115+
chown -R "${USER}" "$PREFIX"
116+
test -d "${HOME}/.conda" && chown -R "${USER}" "${HOME}/.conda"
117117
test -f "${HOME}/.condarc" && chown "${USER}" "${HOME}/.condarc"
118118

119119
notify "Done! Installation is available in $PREFIX."

news/820-test-d-chown

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
### Enhancements
2+
3+
* <news item>
4+
5+
### Bug fixes
6+
7+
* 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)
8+
9+
### Deprecations
10+
11+
* <news item>
12+
13+
### Docs
14+
15+
* <news item>
16+
17+
### Other
18+
19+
* <news item>

0 commit comments

Comments
 (0)