mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Get rid of CanonPath::fromCwd
As discussed in the last Nix team meeting (2024-02-95), this method doesn't belong because `CanonPath` is a virtual/ideal absolute path format, not used in file systems beyond the native OS format for which a "current working directory" is defined. Progress towards #9205
This commit is contained in:
parent
f2f54cf087
commit
4687beecef
30 changed files with 152 additions and 135 deletions
|
@ -299,7 +299,7 @@ static void main_nix_build(int argc, char * * argv)
|
|||
else
|
||||
for (auto i : left) {
|
||||
if (fromArgs)
|
||||
exprs.push_back(state->parseExprFromString(std::move(i), state->rootPath(CanonPath::fromCwd())));
|
||||
exprs.push_back(state->parseExprFromString(std::move(i), state->rootPath(".")));
|
||||
else {
|
||||
auto absolute = i;
|
||||
try {
|
||||
|
@ -400,7 +400,7 @@ static void main_nix_build(int argc, char * * argv)
|
|||
try {
|
||||
auto expr = state->parseExprFromString(
|
||||
"(import <nixpkgs> {}).bashInteractive",
|
||||
state->rootPath(CanonPath::fromCwd()));
|
||||
state->rootPath("."));
|
||||
|
||||
Value v;
|
||||
state->eval(expr, v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue