From 8bf0976778dc98f8f20095b67232551f45585029 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 14:27:36 +0530 Subject: [PATCH 1/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c689b83..d0850292 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: name: CLI strategy: matrix: - os: [ 'ubuntu-latest', 'windows-latest', 'macos-13' ] + os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ] runs-on: ${{ matrix.os }} steps: - name: Set git to use LF From 6c21b9da0862153fd445607dc175a256fef77b82 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 14:52:20 +0530 Subject: [PATCH 2/9] 6737: Fix CLI MacOS Pipeline --- internal/resolution/pm/composer/cmd_factory_test.go | 9 ++++++++- .../pm/composer/testdata/cmd_factory_mock.go | 13 ++++++++++++- internal/resolution/pm/yarn/cmd_factory_test.go | 9 ++++++++- .../resolution/pm/yarn/testdata/cmd_factory_mock.go | 13 ++++++++++++- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/internal/resolution/pm/composer/cmd_factory_test.go b/internal/resolution/pm/composer/cmd_factory_test.go index 5d5a817a..b7c150b9 100644 --- a/internal/resolution/pm/composer/cmd_factory_test.go +++ b/internal/resolution/pm/composer/cmd_factory_test.go @@ -6,10 +6,17 @@ import ( "github.com/stretchr/testify/assert" ) +type fakeExecPath struct{} + +func (fakeExecPath) LookPath(file string) (string, error) { + // Simulate a successful lookup of the composer binary without requiring it in PATH. + return file, nil +} + func TestMakeInstallCmd(t *testing.T) { composerCommand := "composer" cmd, err := CmdFactory{ - execPath: ExecPath{}, + execPath: fakeExecPath{}, }.MakeInstallCmd(composerCommand, "file") assert.NoError(t, err) assert.NotNil(t, cmd) diff --git a/internal/resolution/pm/composer/testdata/cmd_factory_mock.go b/internal/resolution/pm/composer/testdata/cmd_factory_mock.go index 093ba6b2..dfa1183f 100644 --- a/internal/resolution/pm/composer/testdata/cmd_factory_mock.go +++ b/internal/resolution/pm/composer/testdata/cmd_factory_mock.go @@ -11,10 +11,21 @@ type CmdFactoryMock struct { func NewEchoCmdFactory() CmdFactoryMock { return CmdFactoryMock{ - InstallCmdName: "echo", + // Use the Go binary, which is guaranteed to be available + // wherever `go test` is running (both locally and in CI). + InstallCmdName: "go", } } func (f CmdFactoryMock) MakeInstallCmd(command string, file string) (*exec.Cmd, error) { + // When using the default mock command, run a harmless + // `go version` invocation to avoid depending on platform- + // specific binaries like `echo`. + if f.InstallCmdName == "" || f.InstallCmdName == "go" { + return exec.Command("go", "version"), f.MakeInstallErr + } + + // For tests that explicitly set InstallCmdName (e.g. to a + // bad value), keep that behavior so error paths are exercised. return exec.Command(f.InstallCmdName), f.MakeInstallErr } diff --git a/internal/resolution/pm/yarn/cmd_factory_test.go b/internal/resolution/pm/yarn/cmd_factory_test.go index 93db607f..9fd57095 100644 --- a/internal/resolution/pm/yarn/cmd_factory_test.go +++ b/internal/resolution/pm/yarn/cmd_factory_test.go @@ -6,10 +6,17 @@ import ( "github.com/stretchr/testify/assert" ) +type fakeExecPath struct{} + +func (fakeExecPath) LookPath(file string) (string, error) { + // Simulate a successful lookup of the yarn binary without requiring it in PATH. + return file, nil +} + func TestMakeInstallCmd(t *testing.T) { yarnCommand := "yarn" cmd, err := CmdFactory{ - execPath: ExecPath{}, + execPath: fakeExecPath{}, }.MakeInstallCmd(yarnCommand, "file") assert.NoError(t, err) assert.NotNil(t, cmd) diff --git a/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go b/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go index 093ba6b2..dfa1183f 100644 --- a/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go +++ b/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go @@ -11,10 +11,21 @@ type CmdFactoryMock struct { func NewEchoCmdFactory() CmdFactoryMock { return CmdFactoryMock{ - InstallCmdName: "echo", + // Use the Go binary, which is guaranteed to be available + // wherever `go test` is running (both locally and in CI). + InstallCmdName: "go", } } func (f CmdFactoryMock) MakeInstallCmd(command string, file string) (*exec.Cmd, error) { + // When using the default mock command, run a harmless + // `go version` invocation to avoid depending on platform- + // specific binaries like `echo`. + if f.InstallCmdName == "" || f.InstallCmdName == "go" { + return exec.Command("go", "version"), f.MakeInstallErr + } + + // For tests that explicitly set InstallCmdName (e.g. to a + // bad value), keep that behavior so error paths are exercised. return exec.Command(f.InstallCmdName), f.MakeInstallErr } From 40960b040b638be32daeca75d0f55e3eb0a8d016 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 16:06:39 +0530 Subject: [PATCH 3/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 16 ++++++++++++++++ .../resolution/pm/composer/cmd_factory_test.go | 9 +-------- .../pm/composer/testdata/cmd_factory_mock.go | 13 +------------ internal/resolution/pm/yarn/cmd_factory_test.go | 9 +-------- .../pm/yarn/testdata/cmd_factory_mock.go | 13 +------------ 5 files changed, 20 insertions(+), 40 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0850292..32e9c16c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,22 @@ jobs: npm install --global bower bower -v + - name: Install Composer + shell: bash + run: | + set -e + + php -v + + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + php composer-setup.php --install-dir=$HOME --filename=composer + php -r "unlink('composer-setup.php');" + + echo "$HOME" >> $GITHUB_PATH + + composer --version + + - name: Pull Supported Formats run: | cd cmd/debricked diff --git a/internal/resolution/pm/composer/cmd_factory_test.go b/internal/resolution/pm/composer/cmd_factory_test.go index b7c150b9..5d5a817a 100644 --- a/internal/resolution/pm/composer/cmd_factory_test.go +++ b/internal/resolution/pm/composer/cmd_factory_test.go @@ -6,17 +6,10 @@ import ( "github.com/stretchr/testify/assert" ) -type fakeExecPath struct{} - -func (fakeExecPath) LookPath(file string) (string, error) { - // Simulate a successful lookup of the composer binary without requiring it in PATH. - return file, nil -} - func TestMakeInstallCmd(t *testing.T) { composerCommand := "composer" cmd, err := CmdFactory{ - execPath: fakeExecPath{}, + execPath: ExecPath{}, }.MakeInstallCmd(composerCommand, "file") assert.NoError(t, err) assert.NotNil(t, cmd) diff --git a/internal/resolution/pm/composer/testdata/cmd_factory_mock.go b/internal/resolution/pm/composer/testdata/cmd_factory_mock.go index dfa1183f..093ba6b2 100644 --- a/internal/resolution/pm/composer/testdata/cmd_factory_mock.go +++ b/internal/resolution/pm/composer/testdata/cmd_factory_mock.go @@ -11,21 +11,10 @@ type CmdFactoryMock struct { func NewEchoCmdFactory() CmdFactoryMock { return CmdFactoryMock{ - // Use the Go binary, which is guaranteed to be available - // wherever `go test` is running (both locally and in CI). - InstallCmdName: "go", + InstallCmdName: "echo", } } func (f CmdFactoryMock) MakeInstallCmd(command string, file string) (*exec.Cmd, error) { - // When using the default mock command, run a harmless - // `go version` invocation to avoid depending on platform- - // specific binaries like `echo`. - if f.InstallCmdName == "" || f.InstallCmdName == "go" { - return exec.Command("go", "version"), f.MakeInstallErr - } - - // For tests that explicitly set InstallCmdName (e.g. to a - // bad value), keep that behavior so error paths are exercised. return exec.Command(f.InstallCmdName), f.MakeInstallErr } diff --git a/internal/resolution/pm/yarn/cmd_factory_test.go b/internal/resolution/pm/yarn/cmd_factory_test.go index 9fd57095..93db607f 100644 --- a/internal/resolution/pm/yarn/cmd_factory_test.go +++ b/internal/resolution/pm/yarn/cmd_factory_test.go @@ -6,17 +6,10 @@ import ( "github.com/stretchr/testify/assert" ) -type fakeExecPath struct{} - -func (fakeExecPath) LookPath(file string) (string, error) { - // Simulate a successful lookup of the yarn binary without requiring it in PATH. - return file, nil -} - func TestMakeInstallCmd(t *testing.T) { yarnCommand := "yarn" cmd, err := CmdFactory{ - execPath: fakeExecPath{}, + execPath: ExecPath{}, }.MakeInstallCmd(yarnCommand, "file") assert.NoError(t, err) assert.NotNil(t, cmd) diff --git a/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go b/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go index dfa1183f..093ba6b2 100644 --- a/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go +++ b/internal/resolution/pm/yarn/testdata/cmd_factory_mock.go @@ -11,21 +11,10 @@ type CmdFactoryMock struct { func NewEchoCmdFactory() CmdFactoryMock { return CmdFactoryMock{ - // Use the Go binary, which is guaranteed to be available - // wherever `go test` is running (both locally and in CI). - InstallCmdName: "go", + InstallCmdName: "echo", } } func (f CmdFactoryMock) MakeInstallCmd(command string, file string) (*exec.Cmd, error) { - // When using the default mock command, run a harmless - // `go version` invocation to avoid depending on platform- - // specific binaries like `echo`. - if f.InstallCmdName == "" || f.InstallCmdName == "go" { - return exec.Command("go", "version"), f.MakeInstallErr - } - - // For tests that explicitly set InstallCmdName (e.g. to a - // bad value), keep that behavior so error paths are exercised. return exec.Command(f.InstallCmdName), f.MakeInstallErr } From 727a11f21ecc463fc74a7dc3c0ebe0b9d93e89d4 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 16:17:09 +0530 Subject: [PATCH 4/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32e9c16c..a6c7ace7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,21 +31,32 @@ jobs: npm install --global bower bower -v - - name: Install Composer + - name: Install PHP 8.5 shell: bash run: | set -e - php -v - - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php composer-setup.php --install-dir=$HOME --filename=composer - php -r "unlink('composer-setup.php');" - - echo "$HOME" >> $GITHUB_PATH - - composer --version - + if [[ "${{ matrix.os }}" == "windows-latest" ]]; then + powershell -c "irm https://community.chocolatey.org/install.ps1|iex" + choco install php --version=8.5 -y + refreshenv # Refresh environment variables after Chocolatey install + php -v + + elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + sudo apt update + sudo apt install -y php8.5 php8.5-cli php8.5-mbstring php8.5-xml php8.5-curl + php -v + + elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then + curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash + brew install php@8.5 + brew link --force --overwrite php@8.5 + php -v + + else + echo "Unsupported OS: ${{ matrix.os }}" + exit 1 + fi - name: Pull Supported Formats run: | From 26f1f2db4f3e76552325843bb0818c306bebb5da Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 23:23:28 +0530 Subject: [PATCH 5/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6c7ace7..d0850292 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,33 +31,6 @@ jobs: npm install --global bower bower -v - - name: Install PHP 8.5 - shell: bash - run: | - set -e - - if [[ "${{ matrix.os }}" == "windows-latest" ]]; then - powershell -c "irm https://community.chocolatey.org/install.ps1|iex" - choco install php --version=8.5 -y - refreshenv # Refresh environment variables after Chocolatey install - php -v - - elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then - sudo apt update - sudo apt install -y php8.5 php8.5-cli php8.5-mbstring php8.5-xml php8.5-curl - php -v - - elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then - curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash - brew install php@8.5 - brew link --force --overwrite php@8.5 - php -v - - else - echo "Unsupported OS: ${{ matrix.os }}" - exit 1 - fi - - name: Pull Supported Formats run: | cd cmd/debricked From bcfa8e8e617abc6f8799d2fc5877cd58bcae8eb8 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 23:34:47 +0530 Subject: [PATCH 6/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 62 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0850292..d9014521 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,68 @@ jobs: npm install --global bower bower -v + - name: Install PHP & Composer (official tools) + shell: bash + run: | + set -e + + echo "Installing PHP and Composer on ${{ matrix.os }}" + + if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then + sudo apt-get update + # Use distro PHP; don't pin a minor version that may not exist. + sudo apt-get install -y php php-cli php-mbstring php-xml php-curl curl + php -v + + # Install Composer from the official installer + EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then + >&2 echo 'ERROR: Invalid composer installer signature' + rm composer-setup.php + exit 1 + fi + php composer-setup.php --install-dir=/usr/local/bin --filename=composer + rm composer-setup.php + composer --version + + elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then + # Use the system PHP if available, otherwise install via Homebrew + if ! command -v php >/dev/null 2>&1; then + brew update + brew install php + fi + php -v + + EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then + >&2 echo 'ERROR: Invalid composer installer signature' + rm composer-setup.php + exit 1 + fi + php composer-setup.php --install-dir=/usr/local/bin --filename=composer + rm composer-setup.php + composer --version + + elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then + # Enable PHP from the existing Windows image and install Composer globally. + choco install php -y + refreshenv + php -v + + # Download Composer installer PHAR from the official source + curl -sS https://getcomposer.org/installer -o composer-setup.php + php composer-setup.php --install-dir=C:/tools/composer --filename=composer.phar + echo 'export PATH=$PATH:/c/tools/composer' >> "$GITHUB_ENV" + + else + echo "Unsupported OS: ${{ matrix.os }}" + exit 1 + fi + - name: Pull Supported Formats run: | cd cmd/debricked From c8e49c807f95718ac20b3b4b196667afeac373b3 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 23:41:51 +0530 Subject: [PATCH 7/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 120 +++++++++++++++++++++---------------- 1 file changed, 69 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9014521..6ce8f8b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Set git to use LF + run: | git config --global core.autocrlf input git config --global core.eol lf @@ -31,67 +32,84 @@ jobs: npm install --global bower bower -v - - name: Install PHP & Composer (official tools) + - name: Install PHP & Composer (Linux) + if: runner.os == 'Linux' shell: bash run: | set -e - echo "Installing PHP and Composer on ${{ matrix.os }}" - - if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then - sudo apt-get update - # Use distro PHP; don't pin a minor version that may not exist. - sudo apt-get install -y php php-cli php-mbstring php-xml php-curl curl - php -v - - # Install Composer from the official installer - EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then - >&2 echo 'ERROR: Invalid composer installer signature' - rm composer-setup.php - exit 1 - fi - php composer-setup.php --install-dir=/usr/local/bin --filename=composer - rm composer-setup.php - composer --version - - elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then - # Use the system PHP if available, otherwise install via Homebrew - if ! command -v php >/dev/null 2>&1; then - brew update - brew install php - fi - php -v - - EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then - >&2 echo 'ERROR: Invalid composer installer signature' - rm composer-setup.php - exit 1 - fi - php composer-setup.php --install-dir=/usr/local/bin --filename=composer + echo "Installing PHP and Composer on Linux" + + sudo apt-get update + # Use distro PHP; don't pin a minor version that may not exist. + sudo apt-get install -y php php-cli php-mbstring php-xml php-curl curl + php -v + + # Install Composer from the official installer + EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then + >&2 echo 'ERROR: Invalid composer installer signature' rm composer-setup.php - composer --version + exit 1 + fi + php composer-setup.php --install-dir=/usr/local/bin --filename=composer + rm composer-setup.php + composer --version + + - name: Install PHP & Composer (macOS) + if: runner.os == 'macOS' + shell: bash + run: | + set -e - elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then - # Enable PHP from the existing Windows image and install Composer globally. - choco install php -y - refreshenv - php -v + echo "Installing PHP and Composer on macOS" - # Download Composer installer PHAR from the official source - curl -sS https://getcomposer.org/installer -o composer-setup.php - php composer-setup.php --install-dir=C:/tools/composer --filename=composer.phar - echo 'export PATH=$PATH:/c/tools/composer' >> "$GITHUB_ENV" + # Use the system PHP if available, otherwise install via Homebrew + if ! command -v php >/dev/null 2>&1; then + brew update + brew install php + fi + php -v - else - echo "Unsupported OS: ${{ matrix.os }}" + EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then + >&2 echo 'ERROR: Invalid composer installer signature' + rm composer-setup.php exit 1 fi + php composer-setup.php --install-dir=/usr/local/bin --filename=composer + rm composer-setup.php + composer --version + + - name: Install PHP & Composer (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + + Write-Host "Installing PHP and Composer on Windows" + + choco install php -y + php -v + + # Download Composer installer from the official source + $expected = (Invoke-WebRequest -UseBasicParsing https://composer.github.io/installer.sig).Content.Trim() + Invoke-WebRequest -Uri https://getcomposer.org/installer -OutFile composer-setup.php + $actual = (Get-FileHash composer-setup.php -Algorithm SHA384).Hash.ToLower() + if ($expected.ToLower() -ne $actual) { + Write-Error 'ERROR: Invalid composer installer signature' + Remove-Item composer-setup.php + exit 1 + } + + php composer-setup.php --install-dir=C:/tools/composer --filename=composer.phar + Remove-Item composer-setup.php + + # Make sure Composer directory is on PATH for subsequent steps - name: Pull Supported Formats run: | From a3e8b8edd5eb5851ea3f598097986ad66c8920f3 Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Tue, 17 Feb 2026 23:45:18 +0530 Subject: [PATCH 8/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 52 -------------------------------------- 1 file changed, 52 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ce8f8b0..4262a3ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,32 +32,6 @@ jobs: npm install --global bower bower -v - - name: Install PHP & Composer (Linux) - if: runner.os == 'Linux' - shell: bash - run: | - set -e - - echo "Installing PHP and Composer on Linux" - - sudo apt-get update - # Use distro PHP; don't pin a minor version that may not exist. - sudo apt-get install -y php php-cli php-mbstring php-xml php-curl curl - php -v - - # Install Composer from the official installer - EXPECTED_SIGNATURE="$(curl -s https://composer.github.io/installer.sig)" - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" - if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; then - >&2 echo 'ERROR: Invalid composer installer signature' - rm composer-setup.php - exit 1 - fi - php composer-setup.php --install-dir=/usr/local/bin --filename=composer - rm composer-setup.php - composer --version - - name: Install PHP & Composer (macOS) if: runner.os == 'macOS' shell: bash @@ -85,32 +59,6 @@ jobs: rm composer-setup.php composer --version - - name: Install PHP & Composer (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - $ErrorActionPreference = 'Stop' - - Write-Host "Installing PHP and Composer on Windows" - - choco install php -y - php -v - - # Download Composer installer from the official source - $expected = (Invoke-WebRequest -UseBasicParsing https://composer.github.io/installer.sig).Content.Trim() - Invoke-WebRequest -Uri https://getcomposer.org/installer -OutFile composer-setup.php - $actual = (Get-FileHash composer-setup.php -Algorithm SHA384).Hash.ToLower() - if ($expected.ToLower() -ne $actual) { - Write-Error 'ERROR: Invalid composer installer signature' - Remove-Item composer-setup.php - exit 1 - } - - php composer-setup.php --install-dir=C:/tools/composer --filename=composer.phar - Remove-Item composer-setup.php - - # Make sure Composer directory is on PATH for subsequent steps - - name: Pull Supported Formats run: | cd cmd/debricked From 564ac43f6a75da2f21512e0d65822dad191f4fff Mon Sep 17 00:00:00 2001 From: suraj-jadhav Date: Wed, 18 Feb 2026 00:06:13 +0530 Subject: [PATCH 9/9] 6737: Fix CLI MacOS Pipeline --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4262a3ec..d7ff4aac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,6 @@ jobs: shell: bash run: | set -e - echo "Installing PHP and Composer on macOS" # Use the system PHP if available, otherwise install via Homebrew