From af6cc0c934c4e51abbd60835a912aff0f0c42955 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 20 Jul 2021 21:26:16 -0700 Subject: [PATCH] Use "resolve()", not "execute()", for PhutilExecPassthru callsites in Phabricator Summary: Ref T13660. Clean up callsites to "PhutilExecPassthru->execute()" to prepare to deprecate it. Test Plan: - Grepped for "PhutilExecPassthru" and looked for callsites. - Ran `GIT_SSH=.../ssh-connect git ls-remote origin` to execute the "ssh-connect" code. - The two passthru future methods have no callers and could possibly be removed, but I'm just letting sleeping dogs lie for now. Reviewers: cspeckmim Reviewed By: cspeckmim Maniphest Tasks: T13660 Differential Revision: https://secure.phabricator.com/D21703 --- scripts/ssh/ssh-connect.php | 2 +- src/applications/repository/storage/PhabricatorRepository.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ssh/ssh-connect.php b/scripts/ssh/ssh-connect.php index 0d87f16973..c128f3b32f 100755 --- a/scripts/ssh/ssh-connect.php +++ b/scripts/ssh/ssh-connect.php @@ -154,6 +154,6 @@ $pattern = implode(' ', $pattern); array_unshift($arguments, $pattern); $err = newv('PhutilExecPassthru', $arguments) - ->execute(); + ->resolve(); exit($err); diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 8c98dd8756..9cbc6db76d 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -499,7 +499,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO public function passthruRemoteCommand($pattern /* , $arg, ... */) { $args = func_get_args(); - return $this->newRemoteCommandPassthru($args)->execute(); + return $this->newRemoteCommandPassthru($args)->resolve(); } private function newRemoteCommandFuture(array $argv) { @@ -540,7 +540,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO public function passthruLocalCommand($pattern /* , $arg, ... */) { $args = func_get_args(); - return $this->newLocalCommandPassthru($args)->execute(); + return $this->newLocalCommandPassthru($args)->resolve(); } private function newLocalCommandFuture(array $argv) {