[Lando] sudo: command not found Error when using bash ./bin/update-varbase.sh

Created on 4 June 2023, over 1 year ago
Updated 15 November 2023, over 1 year ago

Problem/Motivation

hi i am getting bellow error (more details in attached file) when i try to use the automated update script

Preparing composer.json for Varbase updates...
/app/vendor/vardot/varbase-updater/scripts/update/varbase-updater.sh: line 147: sudo: command not found

In ClassLoader.php line 571:
                                                                                                                                
  include(/app/vendor/composer/../cweagans/composer-patches/src/Patches.php): Failed to open stream: No such file or directory  

Steps to reproduce

./bin/update-varbase.sh from project directory

Thanks

💬 Support request
Status

Fixed

Version

9.0

Component

Updater

Created by

🇧🇯Benin delacosta456

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @delacosta456
  • 🇯🇴Jordan Rajab Natshah Jordan

    sudo: command not found

    Are you allowed to use sudo on the system?

    Updating a Varbase Site

    Updating Varbase should always be done in a local or development environment. Once the update process is properly done and tested you can push your code and build to your production site.
    DO NOT update Varbase directly when in production.

    The Varbase Updater tools requires write permissions to the project directory. Please make sure that the write permissions are active in order for the updater to work.

  • 🇧🇯Benin delacosta456

    hi
    sudo is not available in my dev environment build with lando.

    -- running the script (./bin/update-varbase.sh) directly from my terminal was complaining about php with the messge /usr/bin/env: php: No such file or directory and stopping the process. So i decided to lando ssh inside the container to run the script.(no more **php** msg but now **sudo** ) issue.

    Thanks

  • 🇯🇴Jordan Rajab Natshah Jordan

    From which version of Varbase you are trying to update?
    Using the basic update steps could help if the gap is not too far between versions

    composer update -vvv
    ./bin/drush updb
    ./bin/drush cr
    

    Try not to use bash ./bin/update-varbase.sh If the site is already on the latest 9.0.13 version.

  • 🇧🇯Benin delacosta456

    hi
    yes i am on 9.0.13.
    I was doing this because i have schedules that remind me to always keep update all my Drupal instance .

    I will try and if no issue will keep in mind for next time to be doing the direct update method (if the gap is not too far between versions)

    Thanks

  • 🇧🇯Benin delacosta456

    hi
    Did the direct update .. almost everything goes as expect.

    Only the default_content module throw two errors:

    • When upgrading the below error
        - Upgrading drupal/default_content (dev-2.0.x 674b4ca => dev-2.0.x 9efd1d5): Failed: [RuntimeException] The .git directory is missing from /app/docroot/modules/contrib/default_content, see https://getcomposer.org/commit-deps for more information
          Update failed (The .git directory is missing from /app/docroot/modules/contrib/default_content, see https://getcomposer.org/commit-deps for more information)
          Would you like to try reinstalling the package instead [yes]? <strong>yes</strong>
      
    • After answering "YES" for reinstalling, a patch did not apply:
      > post-package-update: cweagans\Composer\Patches->postInstall
        - Applying patches for drupal/default_content
          https://www.drupal.org/files/issues/2021-04-07/3160146-37.patch (Issue #3160146: Add Layout Builder Normalizer and Denormalize)
      Downloading https://www.drupal.org/files/issues/2021-04-07/3160146-37.patch
      Testing ability to patch with git apply. This command may produce errors that can be safely ignored.
      git -C '/app/docroot/modules/contrib/default_content' apply --check -v '-p1' '/tmp/647d9cf30557e.patch'
      Executing command (CWD): git -C '/app/docroot/modules/contrib/default_content' apply --check -v '-p1' '/tmp/647d9cf30557e.patch'
      Checking patch src/Normalizer/ContentEntityNormalizer.php...
      
      Hunk #1 succeeded at 23 (offset 1 line).
      
      git -C '/app/docroot/modules/contrib/default_content' apply '-p1' '/tmp/647d9cf30557e.patch'
      Executing command (CWD): git -C '/app/docroot/modules/contrib/default_content' apply '-p1' '/tmp/647d9cf30557e.patch'
      

    Thanks

  • Status changed to Fixed over 1 year ago
  • Status changed to Fixed over 1 year ago
Production build 0.71.5 2024