diff --git a/src/nix/store-add-gc-root.cc b/src/nix/store-add-gc-root.cc index cecab256413f..102b4575709a 100644 --- a/src/nix/store-add-gc-root.cc +++ b/src/nix/store-add-gc-root.cc @@ -19,6 +19,12 @@ struct CmdAddGCRoot : StoreCommand .handler = {&links}, .completer = completePath, }); + + addFlag({ + .longName = "no-check", + .description = "Do not test the validity of created roots.", + .handler = {&checkResults, false}, + }); } std::string description() override diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 5167fa814b6f..6defbf417968 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -184,6 +184,7 @@ suites = [ 'debugger.sh', 'extra-sandbox-profile.sh', 'help.sh', + 'store-add-gc-root.sh', ], 'workdir': meson.current_build_dir(), },