From e1d009bc5f0d23c50b1f93b72dbb1b0850bcd01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Fali=C3=A8re?= Date: Tue, 25 Feb 2025 12:27:15 +0100 Subject: [PATCH] ADD MacOS case in pre-commit README.md file --- dev/setup/pre-commit/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dev/setup/pre-commit/README.md b/dev/setup/pre-commit/README.md index 4c32111e5e9..b9ddb78e472 100644 --- a/dev/setup/pre-commit/README.md +++ b/dev/setup/pre-commit/README.md @@ -23,6 +23,8 @@ the project: `pre-commit-config.yaml`. ### Installation in your git project +If you're running MacOS, you can use [homebrew](https://brew.sh/) as a package manager + 1. Install pre-commit tool.\ If you do not have python installed, install [python](https://www.python.org) first.\ `sudo apt install python3` @@ -38,6 +40,11 @@ the project: `pre-commit-config.yaml`. Then install phpcbf and phpcs:\ `sudo apt install php-codesniffer` + If you're running MacOS, you can follow the steps above by replacing the commands by the following:\ + Install [pipx](https://pipx.pypa.io/latest/installation/): `brew install pipx` and then `pipx ensurepath`\ + Install pre-commit tool: `pipx install pre-commit\ + Install phpcbf and phpcs: `brew install php-codesniffer`\ + 3. In your local git clone of the project, run `pre-commit install` to add the hooks or copy the file *dev/setup/git/hooks/pre-commit* manually into *.git/hooks/pre-commit* (recommended because this file may differ from the file installed with the pre-commit install).