File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,9 @@ export namespace SecretsManager {
210
210
throw new Error ( 'Secrets manager is locked, check errors.' ) ;
211
211
}
212
212
if ( isDisabled ( 'jupyter-secrets-manager:manager' ) ) {
213
- lock ( 'Secret registry is disabled.' ) ;
213
+ // If the secrets manager is disabled, we need to lock the manager, but not
214
+ // throw an error, to let the plugin get activated anyway.
215
+ lock ( 'Secret registry is disabled.' , false ) ;
214
216
}
215
217
if ( isDisabled ( id ) ) {
216
218
lock ( `Sign error: plugin ${ id } is disabled.` ) ;
@@ -250,9 +252,13 @@ namespace Private {
250
252
*
251
253
* @param message - the error message to throw.
252
254
*/
253
- export function lock ( message : string ) {
255
+ export function lock ( message : string , throwError = true ) : void {
254
256
locked = true ;
255
- throw new Error ( message ) ;
257
+ if ( throwError ) {
258
+ throw new Error ( message ) ;
259
+ } else {
260
+ console . warn ( message ) ;
261
+ }
256
262
}
257
263
258
264
/**
You can’t perform that action at this time.
0 commit comments