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 @@ -253,7 +253,9 @@ export namespace SecretsManager {
253253 throw new Error ( 'Secrets manager is locked, check errors.' ) ;
254254 }
255255 if ( isDisabled ( 'jupyter-secrets-manager:manager' ) ) {
256- lock ( 'Secret registry is disabled.' ) ;
256+ // If the secrets manager is disabled, we need to lock the manager, but not
257+ // throw an error, to let the plugin get activated anyway.
258+ lock ( 'Secret registry is disabled.' , false ) ;
257259 }
258260 if ( isDisabled ( id ) ) {
259261 lock ( `Sign error: plugin ${ id } is disabled.` ) ;
@@ -293,9 +295,13 @@ namespace Private {
293295 *
294296 * @param message - the error message to throw.
295297 */
296- export function lock ( message : string ) {
298+ export function lock ( message : string , throwError = true ) : void {
297299 locked = true ;
298- throw new Error ( message ) ;
300+ if ( throwError ) {
301+ throw new Error ( message ) ;
302+ } else {
303+ console . warn ( message ) ;
304+ }
299305 }
300306
301307 /**
You can’t perform that action at this time.
0 commit comments