@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fail explicitly instead of continuing with a warning if "phd.user" is misconfigured

Summary: Fixes T6806. We haven't seen users having issues with `phd.user` in a very long time.

Test Plan:
- Configured daemons to run as `notepriestley`, got a well-explained exception.
- Configured daemons to run as `epriestley`, got a clean start.
- Configured daemons with `phd.user=null`, got a clean start.

Reviewers: chad, areitz

Reviewed By: areitz

Subscribers: areitz

Maniphest Tasks: T6806

Differential Revision: https://secure.phabricator.com/D15726

+11 -10
+11 -10
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php
··· 224 224 $daemon_script_dir, 225 225 $config, 226 226 $this->runDaemonsAsUser); 227 - } catch (Exception $e) { 228 - // Retry without sudo 229 - $console->writeOut( 230 - "%s\n", 227 + } catch (Exception $ex) { 228 + throw new PhutilArgumentUsageException( 231 229 pht( 232 - '%s command failed. Starting daemon as current user.', 233 - 'sudo')); 234 - $this->executeDaemonLaunchCommand( 235 - $command, 236 - $daemon_script_dir, 237 - $config); 230 + 'Daemons are configured to run as user "%s" in configuration '. 231 + 'option `%s`, but the current user is "%s" and `phd` was unable '. 232 + 'to switch to the correct user with `sudo`. Command output:'. 233 + "\n\n". 234 + '%s', 235 + $phd_user, 236 + 'phd.user', 237 + $current_user, 238 + $ex->getMessage())); 238 239 } 239 240 } 240 241 }