From 5124fc04ef2f803fe2836c6726783005c7b4bd69 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sat, 24 Aug 2019 17:43:30 -0500 Subject: [PATCH] Update shell calls in Github webhook to use long options --- www/webhooks/github.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/webhooks/github.php b/www/webhooks/github.php index b7fe7f80..fda9b0c8 100644 --- a/www/webhooks/github.php +++ b/www/webhooks/github.php @@ -83,7 +83,7 @@ try{ } // Now that we have the ebook filesystem path, pull the latest commit from GitHub. - exec('sudo -H -u se-vcs-bot /standardebooks.org/scripts/pull-from-github ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); + exec('sudo --set-home --user se-vcs-bot /standardebooks.org/scripts/pull-from-github ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); if($returnCode != 0){ Logger::WriteGithubWebhookLogEntry($requestId, 'Error pulling from GitHub. Output: ' . implode("\n", $output)); throw new WebhookException('Couldn\'t process ebook.', $post); @@ -93,7 +93,7 @@ try{ } // Our local repo is now updated. Build the ebook! - exec('sudo -H -u se-vcs-bot /standardebooks.org/web/scripts/deploy-ebook-to-www ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); + exec('sudo --set-home --user se-vcs-bot /standardebooks.org/web/scripts/deploy-ebook-to-www ' . escapeshellarg($dir) . ' 2>&1', $output, $returnCode); if($returnCode != 0){ Logger::WriteGithubWebhookLogEntry($requestId, 'Error deploying ebook to web. Output: ' . implode("\n", $output)); throw new WebhookException('Couldn\'t process ebook.', $post);