Skip to content

Commit c324e4b

Browse files
committed
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.
1 parent 538ab6c commit c324e4b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,18 @@ runs:
318318
print $result
319319
}
320320
}
321+
let keep_ppa = (
322+
$env
323+
| get --optional 'KEEP_DEBIAN_LLVM_PPA'
324+
| ($in == true or $in == 'true' or $in == 1 or $in == '1')
325+
)
326+
if $keep_ppa {
327+
if $has_sudo {
328+
^sudo rm /etc/apt/sources.list.d/*llvm*.list
329+
} else {
330+
^rm /etc/apt/sources.list.d/*llvm*.list
331+
}
332+
}
321333
322334
- name: Install MacOS clang dependencies
323335
if: runner.os == 'macOS'

0 commit comments

Comments
 (0)