Page MenuHomePhabricator

D17357.diff
No OneTemporary

D17357.diff

diff --git a/src/workflow/ArcanistSetConfigWorkflow.php b/src/workflow/ArcanistSetConfigWorkflow.php
--- a/src/workflow/ArcanistSetConfigWorkflow.php
+++ b/src/workflow/ArcanistSetConfigWorkflow.php
@@ -69,6 +69,16 @@
$settings = new ArcanistSettings();
+ $console = PhutilConsole::getConsole();
+
+ if (!$settings->getHelp($key)) {
+ $warn = pht(
+ 'The configuration key \'%s\' is not recognized by arc. It may '.
+ 'be misspelled or out of date.',
+ $key);
+ $console->writeErr("**%s:** %s\n", pht('Warning'), $warn);
+ }
+
$old = null;
if (array_key_exists($key, $config)) {
$old = $config[$key];
@@ -85,12 +95,12 @@
$old = $settings->formatConfigValueForDisplay($key, $old);
if ($old === null) {
- echo pht(
+ $console->writeOut(
"Deleted key '%s' from %s config.\n",
$key,
$which);
} else {
- echo pht(
+ $console->writeOut(
"Deleted key '%s' from %s config (was %s).\n",
$key,
$which,
@@ -110,13 +120,13 @@
$old = $settings->formatConfigValueForDisplay($key, $old);
if ($old === null) {
- echo pht(
+ $console->writeOut(
"Set key '%s' = %s in %s config.\n",
$key,
$val,
$which);
} else {
- echo pht(
+ $console->writeOut(
"Set key '%s' = %s in %s config (was %s).\n",
$key,
$val,

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 4:05 AM (21 h, 34 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6791863
Default Alt Text
D17357.diff (1 KB)

Event Timeline