File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ Function mui_AnaCustomOptions_Show
173173 ${Else}
174174 ${NSD_CreateLabel} 5 % " $5u" 90 % 20u \
175175 " NOT recommended. This can lead to conflicts with other applications. \
176- Instead, use the Commmand Prompt and Powershell menus added \
176+ Instead, use the Command Prompt and PowerShell menus added \
177177 to the Windows Start Menu."
178178 ${EndIf}
179179 IntOp $5 $5 + 20
Original file line number Diff line number Diff line change @@ -40,7 +40,10 @@ if [[ "${USER}" != "root" ]]; then
4040 if [[ -f " ${file} " ]] || [[ -d " ${file} " ]]; then
4141 OWNER=$( stat -f " %u" " ${file} " | id -un)
4242 if [[ " ${OWNER} " == " root" ]]; then
43- chown " ${USER} " " ${file} "
43+ if ! chown " ${USER} " " ${file} " ; then
44+ MSG=" WARNING! Unable to change ownership of ${file} (owned by ${OWNER} )."
45+ logger -p " install.warning" " ${MSG} " || echo " ${MSG} "
46+ fi
4447 fi
4548 fi
4649 file=" ${file%/* } "
Original file line number Diff line number Diff line change @@ -122,8 +122,22 @@ find "$PREFIX/pkgs" -type d -empty -exec rmdir {} \; 2>/dev/null || :
122122# This is not needed for the default install to ~, but if the user changes the
123123# install location, the permissions will default to root unless this is done.
124124chown -R " ${USER} " " $PREFIX "
125- test -d " ${HOME} /.conda" && chown -R " ${USER} " " ${HOME} /.conda"
126- test -f " ${HOME} /.condarc" && chown " ${USER} " " ${HOME} /.condarc"
125+ CONDA_DIR=" ${HOME} /.conda"
126+ if [[ -d " ${CONDA_DIR} " ]]; then
127+ if ! chown -R " ${USER} " " ${CONDA_DIR} " ; then
128+ OWNER=$( stat -f " %u" " ${CONDA_DIR} " | id -un)
129+ MSG=" WARNING: Unable to change ownership of ${CONDA_DIR} (owned by ${OWNER} )."
130+ logger -p " install.warning" " ${MSG} " || echo " ${MSG} "
131+ fi
132+ fi
133+ CONDARC=" ${HOME} /.condarc"
134+ if [[ -f " ${CONDARC} " ]]; then
135+ if ! chown " ${USER} " " ${CONDARC} " ; then
136+ OWNER=$( stat -f " %u" " ${CONDARC} " | id -un)
137+ MSG=" WARNING: Unable to change ownership of ${CONDARC} (owned by ${OWNER} )."
138+ logger -p " install.warning" " ${MSG} " || echo " ${MSG} "
139+ fi
140+ fi
127141
128142notify " Done! Installation is available in $PREFIX ."
129143
Original file line number Diff line number Diff line change 1+ ### Enhancements
2+
3+ * <news item>
4+
5+ ### Bug fixes
6+
7+ * PKG: Do not fail the installer when ownership of files in `$HOME` cannot be changed. (#1177 via #1184)
8+
9+ ### Deprecations
10+
11+ * <news item>
12+
13+ ### Docs
14+
15+ * <news item>
16+
17+ ### Other
18+
19+ * <news item>
You can’t perform that action at this time.
0 commit comments