Compare commits

...

3 Commits

Author SHA1 Message Date
Jahir Raihan Joy
95115aded1
Merge 6375e4ed79dc584a8174e5816d68a1c31b6d9b27 into 762f9ef9d17623b45095e8ca1a996c8928f3f424 2024-07-07 00:32:42 +09:00
Jordan Harband
762f9ef9d1
[Tests] only install python 2.7 if not already installed
See ee6f7667 / #3067
2024-07-06 10:29:55 -05:00
Jahir Raihan Joy
6375e4ed79 converted tree path to canonical form for case-insensitive comp 2024-05-09 16:24:33 +06:00
2 changed files with 11 additions and 3 deletions

View File

@ -32,7 +32,7 @@ before_install:
- zsh --version
- dpkg -s dash | grep ^Version | awk '{print $2}'
# install python
- pyenv install 2.7.18
- pyenv local 2.7.18 || pyenv install 2.7.18
- pyenv local 2.7.18 || echo 'pyenv failed'
- python -V
install:

12
nvm.sh
View File

@ -417,6 +417,7 @@ else
fi
unset NVM_SCRIPT_SOURCE 2>/dev/null
nvm_tree_contains_path() {
local tree
tree="${1-}"
@ -432,14 +433,21 @@ nvm_tree_contains_path() {
previous_pathdir="${node_path}"
local pathdir
pathdir=$(dirname "${previous_pathdir}")
# Convert tree path to canonical form for case-insensitive comparison
local tree_canonical
tree_canonical=$(cd "${tree}" && pwd -P)
while [ "${pathdir}" != '' ] && [ "${pathdir}" != '.' ] && [ "${pathdir}" != '/' ] &&
[ "${pathdir}" != "${tree}" ] && [ "${pathdir}" != "${previous_pathdir}" ]; do
[ "${pathdir}" != "${tree_canonical}" ] && [ "${pathdir}" != "${previous_pathdir}" ]; do
previous_pathdir="${pathdir}"
pathdir=$(dirname "${previous_pathdir}")
done
[ "${pathdir}" = "${tree}" ]
[ "${pathdir}" = "${tree_canonical}" ]
}
nvm_find_project_dir() {
local path_
path_="${PWD}"