File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments