Skip to content

Commit

Permalink
explicitly disable plugin when MIRRORD_ACTIVE=0 (metalbear-co#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
noamcohen97 authored Nov 20, 2024
1 parent 442afd7 commit f96a6be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/+explicitly-disable-from-env.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Setting `MIRRORD_ACTIVE=0` environment variable will explicitly disable mirrord.
2 changes: 1 addition & 1 deletion src/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function main(
folder: vscode.WorkspaceFolder | undefined,
config: vscode.DebugConfiguration,
_token: vscode.CancellationToken): Promise<vscode.DebugConfiguration | null | undefined> {
if (!globalContext.workspaceState.get('enabled') && !(config.env?.["MIRRORD_ACTIVE"] === "1")) {
if ((!globalContext.workspaceState.get('enabled') && !(config.env?.["MIRRORD_ACTIVE"] === "1")) || config.env?.["MIRRORD_ACTIVE"] === "0") {
return config;
}

Expand Down

0 comments on commit f96a6be

Please sign in to comment.