Skip to content

Commit

Permalink
Merge pull request #125 from a-kenji/merge-nested
Browse files Browse the repository at this point in the history
Improve merging of already constructed inputs
  • Loading branch information
a-kenji authored Aug 11, 2024
2 parents 62c2656 + 0603151 commit de9f4d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ impl<'a> Walker {
} else {
// Update the input, in case there was already a stub present.
if let Some(node) = self.inputs.get_mut(&id) {
node.url = input.url;
if !input.url.to_string().is_empty() {
node.url = input.url;
}
if !input.flake {
node.flake = input.flake;
}
} else {
self.inputs.insert(id, input);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ nixpkgs:
end: 123
not-a-flake:
id: not-a-flake
flake: true
url: ""
flake: false
url: "\"github:a-kenji/not-a-flake\""
follows: []
range:
start: 566
Expand Down

0 comments on commit de9f4d0

Please sign in to comment.