mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
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
This commit is contained in:
parent
d9dd4d427d
commit
f146f4577e
1 changed files with 11 additions and 10 deletions
|
@ -224,17 +224,18 @@ abstract class PhabricatorDaemonManagementWorkflow
|
|||
$daemon_script_dir,
|
||||
$config,
|
||||
$this->runDaemonsAsUser);
|
||||
} catch (Exception $e) {
|
||||
// Retry without sudo
|
||||
$console->writeOut(
|
||||
"%s\n",
|
||||
} catch (Exception $ex) {
|
||||
throw new PhutilArgumentUsageException(
|
||||
pht(
|
||||
'%s command failed. Starting daemon as current user.',
|
||||
'sudo'));
|
||||
$this->executeDaemonLaunchCommand(
|
||||
$command,
|
||||
$daemon_script_dir,
|
||||
$config);
|
||||
'Daemons are configured to run as user "%s" in configuration '.
|
||||
'option `%s`, but the current user is "%s" and `phd` was unable '.
|
||||
'to switch to the correct user with `sudo`. Command output:'.
|
||||
"\n\n".
|
||||
'%s',
|
||||
$phd_user,
|
||||
'phd.user',
|
||||
$current_user,
|
||||
$ex->getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue