Skip to content

update script misleading log when nothing updated #2413

Description

@MikeMcC399

Environment

  • Platform: Ubuntu 24.04.4 LTS
  • Docker Version: N/A
  • Node.js Version: N/A
  • Image Tag: N/A

Expected Behavior

When invoking ./update.sh the logs should only state that a Dockerfile has been updated if its contents have been changed.

Current behavior

./update.sh always outputs text similar to:

Updating version 25...
25/trixie/Dockerfile updated!
Done!

even when no updates have been made and the Dockerfile remains unchanged.

Possible Solution

The logic that preserves the original Yarn version needs to be restored.

Steps to Reproduce

git clone https://github.com/nodejs/docker-node
cd docker-node
./update.sh 25 trixie

Additional Information

61380fa (PR #2258)

  • removed code linking the -s option to alpine
  • removed code that preserved the existing Yarn version

git checkout cc626c1 # previous commit
./update.sh -s 24 # causes only NODE_VERSION to be updated
./update.sh -s 24 # running a second time gives the message "Dockerfile is already up to date!"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions