Skip to content

Commit

Permalink
fix: add timeout for install_nvm.sh (#6170)
Browse files Browse the repository at this point in the history
  • Loading branch information
stasadev committed May 10, 2024
1 parent 38434d6 commit ea922e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Expand Up @@ -105,7 +105,7 @@ sudo chown -R "$(id -u):$(id -g)" /mnt/ddev-global-cache/ /var/lib/php
mkdir -p ~/.yarn/berry
ln -sf /mnt/ddev-global-cache/yarn/berry ~/.yarn/berry/cache
ln -sf /mnt/ddev-global-cache/nvm_dir/${HOSTNAME} ~/.nvm
if [ ! -f ~/.nvm/nvm.sh ]; then (install_nvm.sh || true); fi
if [ ! -f ~/.nvm/nvm.sh ]; then (timeout 30 install_nvm.sh || true); fi

# /mnt/ddev_config/.homeadditions may be either
# a bind-mount, or a volume mount, but we don't care,
Expand Down
Expand Up @@ -91,8 +91,6 @@ disable_xhprof
ls /var/www/html >/dev/null || (echo "/var/www/html does not seem to be healthy/mounted; docker may not be mounting it., exiting" && exit 101)

mkdir -p /mnt/ddev-global-cache/{bashhistory/${HOSTNAME},mysqlhistory/${HOSTNAME},nvm_dir/${HOSTNAME},npm,yarn/classic,yarn/berry,corepack}
ln -sf /mnt/ddev-global-cache/nvm_dir/${HOSTNAME} ~/.nvm
if [ ! -f ~/.nvm/nvm.sh ]; then (install_nvm.sh || true); fi

# The following ensures a persistent and shared "global" cache for
# yarn1 (classic) and yarn2 (berry). In the case of yarn2, the global cache
Expand All @@ -104,7 +102,7 @@ if [ ! -f ~/.nvm/nvm.sh ]; then (install_nvm.sh || true); fi
mkdir -p ~/.yarn/berry
ln -sf /mnt/ddev-global-cache/yarn/berry ~/.yarn/berry/cache
ln -sf /mnt/ddev-global-cache/nvm_dir/${HOSTNAME} ~/.nvm
if [ ! -f ~/.nvm/nvm.sh ]; then (install_nvm.sh || true); fi
if [ ! -f ~/.nvm/nvm.sh ]; then (timeout 30 install_nvm.sh || true); fi

# chown of ddev-global-cache must be done with privileged container in app.Start()
# chown -R "$(id -u):$(id -g)" /mnt/ddev-global-cache/
Expand Down
2 changes: 1 addition & 1 deletion pkg/versionconstants/versionconstants.go
Expand Up @@ -11,7 +11,7 @@ var AmplitudeAPIKey = ""
var WebImg = "ddev/ddev-webserver"

// WebTag defines the default web image tag
var WebTag = "v1.23.0-1" // Note that this can be overridden by make
var WebTag = "20240510_stasadev_nvm_timeout" // Note that this can be overridden by make

// DBImg defines the default db image used for applications.
var DBImg = "ddev/ddev-dbserver"
Expand Down

0 comments on commit ea922e2

Please sign in to comment.