mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Merge pull request #8735 from obsidiansystems/defexpr
Factor out `nix-defexpr` path computation
This commit is contained in:
commit
584ff408a4
4 changed files with 17 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "value-to-json.hh"
|
||||
#include "xml-writer.hh"
|
||||
#include "legacy.hh"
|
||||
#include "eval-settings.hh" // for defexpr
|
||||
|
||||
#include <cerrno>
|
||||
#include <ctime>
|
||||
|
@ -1399,7 +1400,7 @@ static int main_nix_env(int argc, char * * argv)
|
|||
globals.instSource.type = srcUnknown;
|
||||
globals.instSource.systemFilter = "*";
|
||||
|
||||
Path nixExprPath = settings.useXDGBaseDirectories ? createNixStateDir() + "/defexpr" : getHome() + "/.nix-defexpr";
|
||||
Path nixExprPath = getNixDefExpr();
|
||||
|
||||
if (!pathExists(nixExprPath)) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue