From 0afbbdfcaa85822295e85e6f52ea3383f3bd7a88 Mon Sep 17 00:00:00 2001 From: robobun <117481402+robobun@users.noreply.github.com> Date: Tue, 21 Jul 2026 18:01:45 +0000 Subject: [PATCH 01/10] bunfig: load global ~/.bunfig.toml for runtime commands; fall back to $HOME when XDG path has no config Two long-standing gaps between docs and behavior: 1. read_global_config() only matched install-family commands plus bunx. The global ~/.bunfig.toml's top-level fields (preload, define) and [test] section were never applied to bun , bun -e, bun run, or bun test. 2. get_home_config_path() returned the $XDG_CONFIG_HOME path whenever the env var was set, without checking if the file existed. On desktops where XDG_CONFIG_HOME is set by default, $HOME/.bunfig.toml was silently ignored. The global config is now loaded for every command that loads a local bunfig (read_global_config() == LOADS_CONFIG[cmd]), and the XDG path is only used when the file actually exists there. The loaded_bunfig flag moves from load_bunfig (set on any successful parse) to load_config_path (set when the local-config load is attempted) so the run_command.rs fallbacks still fire for bun run / bun