You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/com/coder/toolbox/cli/CoderCLIManager.kt
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -204,22 +204,22 @@ class CoderCLIManager(
204
204
} else {
205
205
throwUnsignedBinaryExecutionDeniedException("Running unsigned CLI from ${cliResult.source} was denied by the user")
206
206
}
207
+
}
208
+
} else {
209
+
// we are not allowed to fetch signatures from releases.coder.com
210
+
// so we will ask the user if he wants to continue
211
+
val acceptsUnsignedBinary = context.ui.showYesNoPopup(
212
+
context.i18n.ptrl("Security Warning"),
213
+
context.i18n.pnotr("No signatures were found for ${cliResult.source} and fallback to releases.coder.com is not allowed. Would you like to run it anyway?"),
214
+
context.i18n.ptrl("Accept"),
215
+
context.i18n.ptrl("Abort"),
216
+
)
217
+
218
+
if (acceptsUnsignedBinary) {
219
+
downloader.commit()
220
+
returntrue
207
221
} else {
208
-
// we could not fetch signatures from releases.coder.com
209
-
// so we will ask the user if he wants to continue
210
-
val acceptsUnsignedBinary = context.ui.showYesNoPopup(
211
-
context.i18n.ptrl("Security Warning"),
212
-
context.i18n.pnotr("No signatures were found for ${cliResult.source} and fallback to releases.coder.com is not allowed. Would you like to run it anyway?"),
213
-
context.i18n.ptrl("Accept"),
214
-
context.i18n.ptrl("Abort"),
215
-
)
216
-
217
-
if (acceptsUnsignedBinary) {
218
-
downloader.commit()
219
-
returntrue
220
-
} else {
221
-
throwUnsignedBinaryExecutionDeniedException("Running unsigned CLI from ${cliResult.source} was denied by the user")
222
-
}
222
+
throwUnsignedBinaryExecutionDeniedException("Running unsigned CLI from ${cliResult.source} was denied by the user")
0 commit comments