File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,10 @@ 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+ console . warn ( 'Secrets manager is disabled.' ) ;
259+ lock ( ) ;
257260 }
258261 if ( isDisabled ( id ) ) {
259262 lock ( `Sign error: plugin ${ id } is disabled.` ) ;
@@ -293,9 +296,11 @@ namespace Private {
293296 *
294297 * @param message - the error message to throw.
295298 */
296- export function lock ( message : string ) {
299+ export function lock ( message ? : string ) : void {
297300 locked = true ;
298- throw new Error ( message ) ;
301+ if ( message ) {
302+ throw new Error ( message ) ;
303+ }
299304 }
300305
301306 /**
You can’t perform that action at this time.
0 commit comments