diff options
Diffstat (limited to 'src/bundler.zig')
-rw-r--r-- | src/bundler.zig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bundler.zig b/src/bundler.zig index 2ca075760..8409f30e9 100644 --- a/src/bundler.zig +++ b/src/bundler.zig @@ -38,6 +38,7 @@ const Lock = @import("./lock.zig").Lock; const NewBunQueue = @import("./bun_queue.zig").NewBunQueue; const NodeFallbackModules = @import("./node_fallbacks.zig"); const CacheEntry = @import("./cache.zig").FsCacheEntry; +const Analytics = @import("./analytics/analytics_thread.zig"); const Linker = linker.Linker; const Resolver = _resolver.Resolver; @@ -231,8 +232,23 @@ pub const Bundler = struct { try this.env.load(&this.fs.fs, dir, true); } }, + .disable => { + this.env.loadProcess(); + }, else => {}, } + + if (this.env.map.get("DISABLE_BUN_ANALYTICS")) |should_disable| { + if (strings.eqlComptime(should_disable, "1")) { + Analytics.disabled = true; + } + } + + if (this.env.map.get("CI")) |IS_CI| { + if (strings.eqlComptime(IS_CI, "true")) { + Analytics.is_ci = true; + } + } } // This must be run after a framework is configured, if a framework is enabled |