feat(ENG-21362): Environment Variables Store (#23930)

This commit is contained in:
Marko Vejnovic
2025-10-23 23:08:08 -07:00
committed by GitHub
parent d648547942
commit e76570f452
67 changed files with 886 additions and 388 deletions

View File

@@ -1885,7 +1885,7 @@ pub const Example = struct {
folders[1] = std.fs.cwd().openDir(outdir_path, .{}) catch bun.invalid_fd.stdDir();
}
if (env_loader.map.get(bun.DotEnv.home_env)) |home_dir| {
if (env_loader.map.get(bun.env_var.HOME.key())) |home_dir| {
var parts = [_]string{ home_dir, BUN_CREATE_DIR };
const outdir_path = filesystem.absBuf(&parts, &home_dir_buf);
folders[2] = std.fs.cwd().openDir(outdir_path, .{}) catch bun.invalid_fd.stdDir();
@@ -2301,7 +2301,7 @@ pub const CreateListExamplesCommand = struct {
Output.prettyln("<r><d>#<r> You can also paste a GitHub repository:\n\n <b>bun create <cyan>ahfarmer/calculator calc<r>\n\n", .{});
if (env_loader.map.get(bun.DotEnv.home_env)) |homedir| {
if (env_loader.map.get(bun.env_var.HOME.key())) |homedir| {
Output.prettyln(
"<d>This command is completely optional. To add a new local template, create a folder in {s}/.bun-create/. To publish a new template, git clone https://github.com/oven-sh/bun, add a new folder to the \"examples\" folder, and submit a PR.<r>",
.{homedir},