From 63b564d0643cc12af03ae9403195f1f51a5c3518 Mon Sep 17 00:00:00 2001 From: hector <42570491+majinghe@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:11:49 +0800 Subject: [PATCH] fix: prevent tilde expansion in DEB version substitution (#5913) The DEB version substitution used ${VERSION/-/~} which caused bash to expand ~ to $HOME (e.g. /home/runner), producing an invalid version string like '1.0.0/home/runnerrc.1'. Store ~ in a variable first to prevent tilde expansion. --- .github/workflows/package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 1dc47b9d9..53c60a0f2 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -225,7 +225,9 @@ jobs: VERSION="${{ needs.resolve.outputs.version }}" DEB_ARCH="${{ matrix.deb_arch }}" # DEB version: replace - with ~ (1.0.0-beta.12 -> 1.0.0~beta.12) - DEB_VERSION="${VERSION/-/~}" + # Use a variable for ~ to prevent tilde expansion by bash + TILDE='~' + DEB_VERSION="${VERSION/-/$TILDE}" PKG_DIR="rustfs_${DEB_VERSION}_${DEB_ARCH}" echo "Building DEB: ${PKG_DIR}.deb"