We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 678d7a3 commit 7bc873dCopy full SHA for 7bc873d
1 file changed
.github/workflows/sudo-tripwire.yaml
@@ -38,7 +38,7 @@ jobs:
38
mkdir -p "$HOME/bin"
39
cat > "$HOME/bin/sudo" << 'EOF'
40
#!/bin/bash
41
- echo "SUDO CALLED with args: $*" >&2
+ echo "SUDO CALLED with args: $*" >> /tmp/sudo-tripwire.log
42
exit 1
43
EOF
44
chmod +x "$HOME/bin/sudo"
@@ -52,8 +52,9 @@ jobs:
52
- name: Check for sudo calls
53
if: always()
54
run: |
55
- if grep -r "SUDO CALLED" '${{ runner.temp }}/package.Rcheck/' 2>/dev/null; then
+ if [ -f /tmp/sudo-tripwire.log ]; then
56
echo "::error::sudo was called during R CMD check!"
57
+ cat /tmp/sudo-tripwire.log
58
59
else
60
echo "No sudo calls detected."
0 commit comments