Page MenuHomePhabricator

D16448.id39559.diff
No OneTemporary

D16448.id39559.diff

diff --git a/src/workflow/ArcanistInstallCertificateWorkflow.php b/src/workflow/ArcanistInstallCertificateWorkflow.php
--- a/src/workflow/ArcanistInstallCertificateWorkflow.php
+++ b/src/workflow/ArcanistInstallCertificateWorkflow.php
@@ -118,7 +118,15 @@
$token));
}
- if (strncmp($token, 'cli-', 4) !== 0) {
+ if (strncmp($token, 'api-', 4) == 0) {
+ echo pht(
+ 'You are installing a standard API token, but a CLI API token '.
+ 'was expected. If you\'re writing a script, consider passing the '.
+ 'token at runtime with --conduit-token instead of installing it.');
+ if (!phutil_console_confirm('Install this token anyway?')) {
+ throw new ArcanistUsageException('Not installing API token.');
+ }
+ } else if (strncmp($token, 'cli-', 4) !== 0) {
throw new ArcanistUsageException(
pht(
'The token "%s" is not formatted correctly. Valid API tokens '.

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 10, 5:29 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7403760
Default Alt Text
D16448.id39559.diff (982 B)

Event Timeline