mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Add deprecation notice for old nix hash conversion subcommands.
(But not yet nix-hash since `nix hash` is still hidden behind a feature flag.) https://github.com/NixOS/nix/issues/8876
This commit is contained in:
parent
fc6f29053a
commit
7ff876b92b
1 changed files with 4 additions and 0 deletions
|
@ -127,6 +127,7 @@ struct CmdToBase : Command
|
|||
|
||||
void run() override
|
||||
{
|
||||
warn("The old format conversion sub commands of `nix hash` where deprecated in favor of `nix hash convert`.");
|
||||
for (auto s : args)
|
||||
logger->cout(Hash::parseAny(s, ht).to_string(hashFormat, hashFormat == HashFormat::SRI));
|
||||
}
|
||||
|
@ -208,6 +209,9 @@ static auto rCmdHash = registerCommand<CmdHash>("hash");
|
|||
/* Legacy nix-hash command. */
|
||||
static int compatNixHash(int argc, char * * argv)
|
||||
{
|
||||
// Wait until `nix hash convert` is not hidden behind experimental flags anymore.
|
||||
// warn("`nix-hash` has been deprecated in favor of `nix hash convert`.");
|
||||
|
||||
std::optional<HashAlgorithm> ha;
|
||||
bool flat = false;
|
||||
HashFormat hashFormat = HashFormat::Base16;
|
||||
|
|
Loading…
Reference in a new issue