Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ export namespace SecretsManager {
throw new Error('Secrets manager is locked, check errors.');
}
if (isDisabled('jupyter-secrets-manager:manager')) {
lock('Secret registry is disabled.');
// If the secrets manager is disabled, we need to lock the manager, but not
// throw an error, to let the plugin get activated anyway.
console.warn('Secrets manager is disabled.');
lock();
}
if (isDisabled(id)) {
lock(`Sign error: plugin ${id} is disabled.`);
Expand Down Expand Up @@ -293,9 +296,11 @@ namespace Private {
*
* @param message - the error message to throw.
*/
export function lock(message: string) {
export function lock(message?: string): void {
locked = true;
throw new Error(message);
if (message) {
throw new Error(message);
}
}

/**
Expand Down
Loading