File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,7 @@ Use the specified .nix file
9393instead of
9494.Ql <nixpkgs>
9595from the Nix search path. This allows using local package definitions
96- or custom package sets. Use
97- .Dq . \&
98- to refer to
99- .Pa ./default.nix
100- in the current directory.
96+ or custom package sets.
10197.El
10298
10399.Sh EXAMPLES
Original file line number Diff line number Diff line change @@ -342,10 +342,12 @@ impl Main {
342342 let tmpdir = TempDir :: new ( "nman" ) . map_err ( NmanError :: IO ) ?;
343343 let nix_import = match & self . file_path {
344344 Some ( path) => {
345- if path == "." {
346- "./default.nix" . to_string ( )
345+ if path. starts_with ( '/' ) {
346+ // Absolute path - strip trailing slashes
347+ path. trim_end_matches ( '/' ) . to_string ( )
347348 } else {
348- path. clone ( )
349+ // Relative path - prepend ./
350+ format ! ( "./{}" , path)
349351 }
350352 } ,
351353 None => "<nixpkgs>" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments