Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/.nvm/test/fast/Unit tests/ |
Upload File : |
#!/bin/sh
cleanup () {
rm -rf "$NVM_DIR"
unset -f die cleanup nvm_get_os check_version
unset NVM_DIR NODE_PATH
}
die () { echo "$@" ; cleanup ; exit 1; }
\. ../../../nvm.sh
set -ex
NVM_DIR=$(mktemp -d)
NODE_PATH="$NVM_DIR/versions/node"
mkdir -p "$NODE_PATH"
if [ -z "$NODE_PATH" ]; then
die 'Unable to create temporary folder'
fi
check_version() {
local VERSION
local BINARY
VERSION=$1
BINARY=$2
# nvm_is_version_installed fails with non existing version
! nvm_is_version_installed "$VERSION" || die "nvm_is_version_installed $VERSION should fail with non existing version"
# nvm_is_version_installed fails with non executable existing version
mkdir -p "$NODE_PATH/$VERSION/bin" && cd "$NODE_PATH/$VERSION/bin" && touch "$NODE_PATH/$VERSION/bin/$BINARY"
! nvm_is_version_installed "$VERSION" || die "nvm_is_version_installed $VERSION should fail with non executable existing version"
# nvm_is_version_installed whould work
chmod +x "$NODE_PATH/$VERSION/bin/$BINARY"
nvm_is_version_installed "$VERSION" || die "nvm_is_version_installed $VERSION should work"
}
# nvm_is_version_installed is available
type nvm_is_version_installed > /dev/null 2>&1 || die 'nvm_is_version_installed is not available'
# nvm_is_version_installed with no parameter fails
! nvm_is_version_installed || die 'nvm_is_version_installed without parameter should fail'
check_version '12.0.0' 'node'
# Checking for Windows
nvm_get_os() {
echo "win"
}
check_version '13.0.0' 'node.exe'
cleanup