diff --git a/docs/Pre-commit.md b/docs/Pre-commit.md index f2091edf0..4a57e7203 100644 --- a/docs/Pre-commit.md +++ b/docs/Pre-commit.md @@ -53,21 +53,12 @@ repos: From the root of your repository ```bash +cd +dotnet new tool-manifest dotnet tool install husky dotnet husky install ``` -Optionally - add this to one of your projects to automate the install for future developers -```xml - - - - - WorkingDirectory="../../" /> - -``` - Modify the file at `.husky/task-runner.json` ```json { @@ -85,6 +76,12 @@ You can run and test your task with the following command. dotnet husky run ``` +Optionally - add this to one of your projects to automate the installation for future developers +You can set the HUSKY environment variable to 0 to disable Husky in CI/CD pipelines. +```bash +dotnet husky attach +``` + Once you are sure the task is working properly, you can add it as a pre-commit hook. ```bash dotnet husky add pre-commit -c "dotnet husky run"