From c324e4b0d7458fefa1ab2b8a58a70f6a6050d1d9 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/action.yml b/action.yml index 6aee249..9db71c7 100644 --- a/action.yml +++ b/action.yml @@ -318,6 +318,18 @@ runs: print $result } } + let keep_ppa = ( + $env + | get --optional 'KEEP_DEBIAN_LLVM_PPA' + | ($in == true or $in == 'true' or $in == 1 or $in == '1') + ) + if $keep_ppa { + if $has_sudo { + ^sudo rm /etc/apt/sources.list.d/*llvm*.list + } else { + ^rm /etc/apt/sources.list.d/*llvm*.list + } + } - name: Install MacOS clang dependencies if: runner.os == 'macOS'