diff options
author | 2023-09-20 19:13:31 +0200 | |
---|---|---|
committer | 2023-09-20 10:13:31 -0700 | |
commit | aa3355dc823b9166c162094bad55c90bf15d144c (patch) | |
tree | 4de695e6966a439ef0736795b15408b1e452c157 /src/bunfig.zig | |
parent | 8c612adcdb04cdc71a464c9a8df4bd871eaffc7d (diff) | |
download | bun-aa3355dc823b9166c162094bad55c90bf15d144c.tar.gz bun-aa3355dc823b9166c162094bad55c90bf15d144c.tar.zst bun-aa3355dc823b9166c162094bad55c90bf15d144c.zip |
feat: switch disableTelemetry to bunfig (#5690)
* feat: switch disableTelemetry to bunfig
* feat: zig fmt
* revert: the env variable and invert the logic of telemetry
---------
Co-authored-by: MrPalixir <73360179+MrPalixir@users.noreply.github.com>
Diffstat (limited to 'src/bunfig.zig')
-rw-r--r-- | src/bunfig.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bunfig.zig b/src/bunfig.zig index 63a6c389d..a777475da 100644 --- a/src/bunfig.zig +++ b/src/bunfig.zig @@ -216,6 +216,11 @@ pub const Bunfig = struct { if (json.get("preload")) |expr| { try this.loadPreload(allocator, expr); } + + if (json.get("telemetry")) |expr| { + try this.expect(expr, .e_boolean); + Analytics.disabled = !expr.data.e_boolean.value; + } } if (comptime cmd == .RunCommand or cmd == .AutoCommand) { |