File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,17 @@ struct GitInputScheme : InputScheme
435435 //
436436 // See: https://discourse.nixos.org/t/57783 and #9708
437437 //
438- repoInfo.url = repoInfo.isLocal ? std::filesystem::absolute (url.path ).string () : url.to_string ();
438+ if (repoInfo.isLocal ) {
439+ if (!isAbsolute (url.path )) {
440+ warn (
441+ " Fetching Git repository '%s', which uses a path relative to the current directory. "
442+ " This is not supported and will stop working in a future release. "
443+ " See https://github.com/NixOS/nix/issues/12281 for details." ,
444+ url);
445+ }
446+ repoInfo.url = std::filesystem::absolute (url.path ).string ();
447+ } else
448+ repoInfo.url = url.to_string ();
439449
440450 // If this is a local directory and no ref or revision is
441451 // given, then allow the use of an unclean working tree.
You can’t perform that action at this time.
0 commit comments