@@ -58,7 +58,7 @@ func ProfileListItems(
58
58
index : index ,
59
59
unlockedReference : element .OriginalURL + "#" + element .AttrPath ,
60
60
lockedReference : element .URL + "#" + element .AttrPath ,
61
- nixStorePath : element .StorePaths [ 0 ] ,
61
+ nixStorePaths : element .StorePaths ,
62
62
})
63
63
}
64
64
return items , nil
@@ -133,7 +133,8 @@ func ProfileListIndex(args *ProfileListIndexArgs) (int, error) {
133
133
return - 1 , errors .Wrapf (err , "failed to get installable for %s" , args .Package .String ())
134
134
}
135
135
for _ , item := range items {
136
- if pathInStore == item .nixStorePath {
136
+ if len (item .nixStorePaths ) == 1 && // this should always be true
137
+ pathInStore == item .nixStorePaths [0 ] {
137
138
return item .index , nil
138
139
}
139
140
}
@@ -191,15 +192,15 @@ func parseNixProfileListItem(line string) (*NixProfileListItem, error) {
191
192
lockedReference := scanner .Text ()
192
193
193
194
if ! scanner .Scan () {
194
- return nil , redact .Errorf ("error parsing \" nix profile list\" output: line is missing nixStorePath : %s" , line )
195
+ return nil , redact .Errorf ("error parsing \" nix profile list\" output: line is missing nixStorePaths : %s" , line )
195
196
}
196
- nixStorePath := scanner .Text ()
197
+ nixStorePaths := strings . Fields ( scanner .Text () )
197
198
198
199
return & NixProfileListItem {
199
200
index : index ,
200
201
unlockedReference : unlockedReference ,
201
202
lockedReference : lockedReference ,
202
- nixStorePath : nixStorePath ,
203
+ nixStorePaths : nixStorePaths ,
203
204
}, nil
204
205
}
205
206
0 commit comments