From 146f1a2ccd1d26c6024054ed98023059b31d6ddc Mon Sep 17 00:00:00 2001 From: Alex Povel Date: Sat, 29 Jul 2023 10:51:39 +0200 Subject: [PATCH] fix: Onboarding with global `pip install` --- Justfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index 06ca9a8..ea08d52 100644 --- a/Justfile +++ b/Justfile @@ -7,10 +7,16 @@ set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] set ignore-comments := true # Runs onboarding steps, installing dependencies and setting up the environment. -onboard: - pip install pre-commit && pre-commit install --hook-type pre-push --hook-type pre-commit --hook-type commit-msg +onboard: install-pre-commit install-afl + pre-commit install --hook-type pre-push --hook-type pre-commit --hook-type commit-msg cargo install cargo-tarpaulin +# Installs pre-commit, the program. +[unix] +install-pre-commit: + # From Debian 12, `pip install` globally is an error ("This environment is externally managed.") + command -v pre-commit > /dev/null || { pip install pre-commit || sudo apt-get update && sudo apt-get install --yes pre-commit; } + # Runs fuzz testing. [unix] fuzz: install-afl