@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.

When storage is not initialized, write the error message to stderr instead of stdout

Summary:
We have to do some garbage nonsense to write database backups right now, see T6996.

When storage isn't initialized, we previously ended up with this message gzipped in a file and an empty error. Make the behavior slightly more tolerable.

Test Plan: Saw a meaningful error after trying to back up an uninitialized database.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

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

+7 -5
+7 -5
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php
··· 11 11 } 12 12 13 13 public function execute(PhutilArgumentParser $args) { 14 + $console = PhutilConsole::getConsole(); 14 15 $api = $this->getAPI(); 15 16 $patches = $this->getPatches(); 16 17 17 18 $applied = $api->getAppliedPatches(); 18 19 if ($applied === null) { 19 20 $namespace = $api->getNamespace(); 20 - echo phutil_console_wrap( 21 - phutil_console_format( 22 - "**No Storage**: There is no database storage initialized in this ". 23 - "storage namespace ('{$namespace}'). Use '**storage upgrade**' to ". 24 - "initialize storage.\n")); 21 + $console->writeErr( 22 + pht( 23 + '**Storage Not Initialized**: There is no database storage '. 24 + 'initialized in this storage namespace ("%s"). Use '. 25 + '**storage upgrade** to initialize storage.', 26 + $namespace)); 25 27 return 1; 26 28 } 27 29