Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14096563
D17357.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17357.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17357: arc set-config: warn about unknown keys
Attached
Detach File
Event Timeline
Log In to Comment