Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15337363
D16448.id39559.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
982 B
Referenced Files
None
Subscribers
None
D16448.id39559.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D16448: Added a warning prompt if the user tries to use an API cert instead of a CLI cert
Attached
Detach File
Event Timeline
Log In to Comment