Skip to content

Commit 908ee5e

Browse files
committed
Fix 8.3~ expansion
- Workaround for conda installer bug that falsely claims ~ dirs are invalid Signed-off-by: Andy Neff <andy@visionsystemsinc.com>
1 parent d230000 commit 908ee5e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

linux/just_files/just_install_functions.bsh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,14 @@ function conda-install()
261261
local conda_exe_footer
262262
# windows
263263
if [ "${OS-}" = "Windows_NT" ]; then
264+
# There is an egregious bug in conda where it says:
265+
# ::error:: 'Destination Folder' contains the following invalid character:
266+
# complaining about tildes. In order to fix that, we need the -l flag on
267+
# cygpath, but that will only work if the full path exists, even if the
268+
# subdirectory already exists (i.e. if ~/foobar~1 exists, ~/foobar~1/stuff
269+
# fails to expand). So mkdir first
270+
mkdir -p "${conda_dir}"
271+
local windows_conda_dir=$(cygpath -law "${conda_dir}")
264272

265273
# manual specification of NoRegistry, AddToPath, & RegisterPython
266274
# ensure the conda install is not added to the system registry
@@ -270,7 +278,7 @@ function conda-install()
270278
MSYS2_ARG_CONV_EXCL="*" "${CONDA_INSTALLER}" \
271279
/NoRegistry=1 /AddToPath=0 /RegisterPython=0 \
272280
/NoShortcuts=1 \
273-
/InstallationType=JustMe /S /D="$(cygpath -aw "${conda_dir}")"
281+
/InstallationType=JustMe /S /D="${windows_conda_dir}"
274282

275283
# conda executable
276284
conda_exe_footer="Scripts/conda.exe"

0 commit comments

Comments
 (0)