Skip to content

Commit

Permalink
fix(rust-cargo-lock): remove leading period prefix from any workspace…
Browse files Browse the repository at this point in the history
… member relative paths (#1081)
  • Loading branch information
yusdacra authored Dec 20, 2024
1 parent a8dac99 commit bf02c10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/dream2nix/rust-cargo-lock/translate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
l.map
(
memberName: let
components = l.splitString "/" memberName;
_components = l.splitString "/" memberName;
# remove leading period, its not necessary (it also causes issues with getNodeFromPath for some reason)
components = l.filter (c: c != ".") _components;
in
# Resolve globs if there are any
if l.last components == "*"
Expand All @@ -60,7 +62,7 @@
l.mapAttrsToList
(name: _: "${parentDirRel}/${name}")
dirs
else memberName
else l.concatStringsSep "/" components
)
(rootToml.value.workspace.members or [])
);
Expand Down

0 comments on commit bf02c10

Please sign in to comment.