From 73339dda053213ee25d1be7cd699ba077bf9bc78 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 26 Nov 2024 04:17:55 +0000 Subject: fix(init): initialise base empty environment on init command --- flake.nix | 2 +- internal/commands/init.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ad3bdd3..f91c1e5 100644 --- a/flake.nix +++ b/flake.nix @@ -54,7 +54,7 @@ inherit meta; pname = name; - version = "2024.10.25"; + version = "2024.11.25"; src = pkgs.lib.cleanSource ./.; vendorHash = "sha256-XQEB2vgiztbtLnc7BR4WTouPI+2NDQXXFUNidqmvbac="; buildInputs = [ pkgs.musl ]; diff --git a/internal/commands/init.go b/internal/commands/init.go index c4bc138..94433ab 100644 --- a/internal/commands/init.go +++ b/internal/commands/init.go @@ -14,6 +14,9 @@ func Init(sources *yae.Environment) func(c *cli.Context) error { return fmt.Errorf("sources file already exists") } + sources.Sources = make(map[string]yae.Source) + sources.Schema = "https://raw.githubusercontent.com/Fuwn/yae/refs/heads/main/yae.schema.json" + if c.Bool("dry-run") { return nil } -- cgit v1.2.3