Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion constructor/nsis/OptionsDialog.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Function mui_AnaCustomOptions_Show
${Else}
${NSD_CreateLabel} 5% "$5u" 90% 20u \
"NOT recommended. This can lead to conflicts with other applications. \
Instead, use the Commmand Prompt and Powershell menus added \
Instead, use the Command Prompt and PowerShell menus added \
to the Windows Start Menu."
${EndIf}
IntOp $5 $5 + 20
Expand Down
5 changes: 4 additions & 1 deletion constructor/osx/run_conda_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ if [[ "${USER}" != "root" ]]; then
if [[ -f "${file}" ]] || [[ -d "${file}" ]]; then
OWNER=$(stat -f "%u" "${file}" | id -un)
if [[ "${OWNER}" == "root" ]]; then
chown "${USER}" "${file}"
if ! chown "${USER}" "${file}"; then
MSG="WARNING! Unable to change ownership of ${file} (owned by ${OWNER})."
logger -p "install.warning" "${MSG}" || echo "${MSG}"
fi
fi
fi
file="${file%/*}"
Expand Down
18 changes: 16 additions & 2 deletions constructor/osx/run_installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,22 @@ find "$PREFIX/pkgs" -type d -empty -exec rmdir {} \; 2>/dev/null || :
# 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"
test -d "${HOME}/.conda" && chown -R "${USER}" "${HOME}/.conda"
test -f "${HOME}/.condarc" && chown "${USER}" "${HOME}/.condarc"
CONDA_DIR="${HOME}/.conda"
if [[ -d "${CONDA_DIR}" ]]; then
if ! chown -R "${USER}" "${CONDA_DIR}"; then
OWNER=$(stat -f "%u" "${CONDA_DIR}" | id -un)
MSG="WARNING: Unable to change ownership of ${CONDA_DIR} (owned by ${OWNER})."
logger -p "install.warning" "${MSG}" || echo "${MSG}"
fi
fi
CONDARC="${HOME}/.condarc"
if [[ -f "${CONDARC}" ]]; then
if ! chown "${USER}" "${CONDARC}"; then
OWNER=$(stat -f "%u" "${CONDARC}" | id -un)
MSG="WARNING: Unable to change ownership of ${CONDARC} (owned by ${OWNER})."
logger -p "install.warning" "${MSG}" || echo "${MSG}"
fi
fi

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

Expand Down
19 changes: 19 additions & 0 deletions news/1185-pkg-chown-permissions
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* PKG: Do not fail the installer when ownership of files in `$HOME` cannot be changed. (#1177 via #1184)

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
Loading