Skip to content

Commit e5068a4

Browse files
committed
Try wrapping a script for debugging
1 parent c12ecf9 commit e5068a4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

bin/sudo-u.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh -eux
2+
3+
sudo -u "$@"
4+

cgi-bin/webhook.cgi

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class PushHook
185185
end
186186

187187
def execute(*cmd, user:)
188-
cmd = ['/usr/bin/sudo', '-u', user, *cmd]
188+
cmd = ['/home/git/git.ruby-lang.org/bin/sudo-u.sh', user, *cmd]
189189
logger.info("+ #{cmd.shelljoin}")
190190
system("#{cmd.shelljoin} >> #{Webhook::LOG_PATH} 2>&1")
191191
logger.info("done")

0 commit comments

Comments
 (0)