Commit 56af312
authored
[bug] Fix parseStorePathFromInstallableOutput (#2098)
## Summary
Fix regression introduced in
#2076
I misunderstood the API. A null value (in modern API) or a valid: false
(in legacy API) occur when store path doesn't exist. Whether the store
path itself is a valid store path doesn't matter, obviously if it is not
a valid path, it won't be present in the store, but if it's valid and
not installed, it will return null value or valid: false. The users of
this function do not want to ignore these paths.
Edit: This bug is a bit less bad than initially thought. Because we
install non-cached packages in flake, so anything missing would be
installed then.
## How was it tested?
Unit test.
This is tricky to test. I added a test script that can hopefully catch
this.
Edit: This test doesn't actually catch this because the package ends up
getting installed later on (in the flake). I still think this test is
good to have.1 parent b9eee59 commit 56af312
File tree
3 files changed
+27
-11
lines changed- internal/nix
- testscripts/lockfile
3 files changed
+27
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
100 | | - | |
| 98 | + | |
101 | 99 | | |
102 | 100 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 101 | | |
107 | 102 | | |
108 | 103 | | |
| |||
111 | 106 | | |
112 | 107 | | |
113 | 108 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 109 | + | |
117 | 110 | | |
118 | 111 | | |
119 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments