-
-
Notifications
You must be signed in to change notification settings - Fork 292
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Vendor packages need to be installed for PHPStan to analyze use of injected dependencies, and a composer install pre-command fails with a command not found error in v7.0.x.
To Reproduce
Steps to reproduce the behavior:
- Configure a
PRE_COMMANDin.mega-linter.yml
PRE_COMMANDS:
- command: composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --ignore-platform-req=ext-sockets --ignore-platform-req=ext-intl --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-sodium --ignore-platform-req=ext-posix --ignore-platform-req=ext-gd --ignore-platform-req=ext-xml
cwd: "workspace"
- Run version 7:
npx mega-linter-runner -r v7.0.3 - Note the output:
The MegaLinter documentation can be found at:
- https://megalinter.io/7.0.3
----------------------------------------------------------------------------------------------------
MegaLinter initialization
MegaLinter will analyze workspace [/tmp/lint]
[Pre] run: [composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --ignore-platform-req=ext-sockets --ignore-platform-req=ext-intl --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-sodium --ignore-platform-req=ext-posix --ignore-platform-req=ext-gd --ignore-platform-req=ext-xml] in cwd [/tmp/lint]
[Pre] error:
/bin/bash: line 1: composer: command not found
- Repeat on verson 6:
npx mega-linter-runner -r v6.22.2 - Note the output:
The MegaLinter documentation can be found at:
- https://megalinter.io/6.22.2
----------------------------------------------------------------------------------------------------
MegaLinter initialization
[Pre] run: [composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts --ignore-platform-req=ext-sockets --ignore-platform-req=ext-intl --ignore-platform-req=ext-fileinfo --ignore-platform-req=ext-sodium --ignore-platform-req=ext-posix --ignore-platform-req=ext-gd --ignore-platform-req=ext-xml] in cwd [/tmp/lint]
[Pre] Installing dependencies from lock file (including require-dev)
Expected behavior
Composer should install vendor packages on a pre-command.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working