aboutsummaryrefslogtreecommitdiff
path: root/src/nix/flake.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-03-19 17:21:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-03-19 17:21:37 +0100
commitef83ced4e170130cb6f9acd1d253351b02490658 (patch)
treefd1b3d76774abb128f4dced735c42dc13c8454c1 /src/nix/flake.cc
parent8a5203d3b836497c2c5f157f85008aa8bcb6a1d2 (diff)
Restore 'nix flake info' as a deprecated alias
Diffstat (limited to 'src/nix/flake.cc')
-rw-r--r--src/nix/flake.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 5ce2e082c..a2b6c0303 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -230,6 +230,15 @@ struct CmdFlakeMetadata : FlakeCommand, MixJSON
}
};
+struct CmdFlakeInfo : CmdFlakeMetadata
+{
+ void run(nix::ref<nix::Store> store) override
+ {
+ warn("'nix flake info' is a deprecated alias for 'nix flake metadata'");
+ CmdFlakeMetadata::run(store);
+ }
+};
+
struct CmdFlakeCheck : FlakeCommand
{
bool build = true;
@@ -1024,6 +1033,7 @@ struct CmdFlake : NixMultiCommand
{"update", []() { return make_ref<CmdFlakeUpdate>(); }},
{"lock", []() { return make_ref<CmdFlakeLock>(); }},
{"metadata", []() { return make_ref<CmdFlakeMetadata>(); }},
+ {"info", []() { return make_ref<CmdFlakeInfo>(); }},
{"check", []() { return make_ref<CmdFlakeCheck>(); }},
{"init", []() { return make_ref<CmdFlakeInit>(); }},
{"new", []() { return make_ref<CmdFlakeNew>(); }},