Skip to content

Skip the Same-File Move in download.sh for a Direct vms_server.deb URL #593

Open

Description

@ptr727

Raised by CodeRabbit on #592 against Docker/download.sh, whose logic that pull request only re-indented.

The *.deb branch runs mv "${DOWNLOAD_FILENAME}" "${DEB_FILE}" with DEB_FILE="./vms_server.deb". When a direct .deb URL's basename is itself vms_server.deb, source and destination are the same file, and GNU mv exits 1:

$ touch vms_server.deb && mv vms_server.deb ./vms_server.deb
mv: 'vms_server.deb' and './vms_server.deb' are the same file

Under set -euo pipefail that fails the image build. It is latent today: every Make/Matrix.json URL is a .zip, and none is named vms_server.deb. The fix is to skip the move when the downloaded name already equals the target, for example comparing "${DOWNLOAD_FILENAME}" with "${DEB_FILE#./}".

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