From 946610caddcca8b0c36ae759b9b1c6a9d3d64b29 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Thu, 17 Oct 2024 21:05:28 -0700 Subject: [PATCH] fix: remove debian LLVM PPA repo (Linux runners only) resolves #265 Users that expect the PPA to be present _after_ running cpp-linter-action can set the environment variable `KEEP_DEBIAN_LLVM_PPA` to `true`, `on`, or `1`. By default, the PPA is removed. --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index a676f41..e530df1 100644 --- a/action.yml +++ b/action.yml @@ -249,6 +249,12 @@ runs: chmod +x $GITHUB_ACTION_PATH/llvm_install.sh if sudo $GITHUB_ACTION_PATH/llvm_install.sh ${{ inputs.version }}; then sudo apt-get install -y clang-format-${{ inputs.version }} clang-tidy-${{ inputs.version }} + case "${{ env.KEEP_DEBIAN_LLVM_PPA }}" in + "true" | "on" | "1");; + *) + sudo rm /etc/apt/sources.list.d/*llvm*.list || true + ;; + esac fi fi