Page MenuHomePhabricator

D16448.diff
No OneTemporary

D16448.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(pht('Install this token anyway?'))) {
+ throw new ArcanistUsageException(pht('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
Fri, May 10, 4:38 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276980
Default Alt Text
D16448.diff (992 B)

Event Timeline