Skip to content

Commit a707971

Browse files
fix: symbolic linking (ln -s) with pre-existing installation (#1135)
* fix: symbolic linking (`ln -s`) failure with pre-existing installation * fix: symbolic linking (`ln -s`) failure with pre-existing installation, also for osx prepare_installation.sh script * docs: add news file * Rename fix-symbolic-linking to 1135-fix-symbolic-linking * Apply suggestion from @marcoesters --------- Co-authored-by: Marco Esters <mesters@anaconda.com>
1 parent 576212e commit a707971

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

constructor/header.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ chmod +x "$CONDA_EXEC"
501501
502502
{%- if conda_exe_name != "_conda" %}
503503
# In case there are packages that depend on _conda
504-
ln -s "$CONDA_EXEC" "$PREFIX"/_conda
504+
ln -s -f "$CONDA_EXEC" "$PREFIX"/_conda
505505
{%- endif %}
506506
507507
{%- for filename, (start, end, executable) in conda_exe_payloads|items %}

constructor/osx/prepare_installation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ chmod +x "$CONDA_EXEC"
3232

3333
{%- if conda_exe_name != "_conda" %}
3434
# In case there are packages that depend on _conda
35-
ln -s "$CONDA_EXEC" "$PREFIX"/_conda
35+
ln -s -f "$CONDA_EXEC" "$PREFIX"/_conda
3636
{%- endif %}
3737

3838
# Create a blank history file so conda thinks this is an existing env

news/1135-fix-symbolic-linking

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Bug fixes
2+
3+
* Force symbolic linking of `_conda` in SH and PKG installers. This fixes a regression introduced by #1090 that made installations fail if `_conda` already exists in the target location. (#1135)

0 commit comments

Comments
 (0)