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 {
210210 throw new Error ( 'Secrets manager is locked, check errors.' ) ;
211211 }
212212 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 ) ;
214216 }
215217 if ( isDisabled ( id ) ) {
216218 lock ( `Sign error: plugin ${ id } is disabled.` ) ;
@@ -250,9 +252,13 @@ namespace Private {
250252 *
251253 * @param message - the error message to throw.
252254 */
253- export function lock ( message : string ) {
255+ export function lock ( message : string , throwError = true ) : void {
254256 locked = true ;
255- throw new Error ( message ) ;
257+ if ( throwError ) {
258+ throw new Error ( message ) ;
259+ } else {
260+ console . warn ( message ) ;
261+ }
256262 }
257263
258264 /**
You can’t perform that action at this time.
0 commit comments