Skip to content

Commit a8e10bd

Browse files
only lookup deploymentid in atlas local delete tool when telemetry is enabled
1 parent eda00a2 commit a8e10bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/atlasLocal/delete/deleteDeployment.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export class DeleteDeploymentTool extends AtlasLocalToolBase {
1616
client: Client,
1717
{ deploymentName }: ToolArgs<typeof this.argsShape>
1818
): Promise<CallToolResult> {
19-
const deploymentId = await this.lookupDeploymentId(client, deploymentName);
19+
const deploymentId = this.telemetry.isTelemetryEnabled()
20+
? await this.lookupDeploymentId(client, deploymentName)
21+
: undefined;
2022

2123
// Delete the deployment
2224
await client.deleteDeployment(deploymentName);

0 commit comments

Comments
 (0)