mirror of
https://github.com/NixOS/nix
synced 2025-07-02 05:11:47 +02:00
Add legacy setting: nix-shell-always-looks-for-shell-nix
This commit is contained in:
parent
b865625a8e
commit
6c6d5263e2
6 changed files with 60 additions and 5 deletions
19
src/libcmd/compatibility-settings.hh
Normal file
19
src/libcmd/compatibility-settings.hh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#include "config.hh"
|
||||
|
||||
namespace nix {
|
||||
struct CompatibilitySettings : public Config
|
||||
{
|
||||
|
||||
CompatibilitySettings() = default;
|
||||
|
||||
Setting<bool> nixShellAlwaysLooksForShellNix{this, true, "nix-shell-always-looks-for-shell-nix", R"(
|
||||
Before Nix 2.24, [`nix-shell`](@docroot@/command-ref/nix-shell.md) would only look at `shell.nix` if it was in the working directory - when no file was specified.
|
||||
|
||||
Since Nix 2.24, `nix-shell` always looks for a `shell.nix`, whether that's in the working directory, or in a directory that was passed as an argument.
|
||||
|
||||
You may set this to `false` to revert to the Nix 2.3 behavior.
|
||||
)"};
|
||||
};
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue