Skip to content

Commit ab2e8a7

Browse files
authored
move nix.System call inside featureflag.RemoveNixpkgs if-condition (#1247)
## Summary I'm not yet entirely sure why, but #1245 led to some testscript error. For now, I'm hiding the nix.System call inside the feature flag's if-condition to get the testscripts status to green again on `main`. ## How was it tested? testscripts should pass
1 parent 4e672c5 commit ab2e8a7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

internal/lock/lockfile.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,13 @@ func (l *File) Remove(pkgs ...string) error {
8888
func (l *File) Resolve(pkg string) (*Package, error) {
8989
entry, hasEntry := l.Packages[pkg]
9090

91-
userSystem, err := nix.System()
92-
if err != nil {
93-
return nil, err
94-
}
95-
9691
// If the package's system info is missing, we need to resolve it again.
9792
needsSysInfo := false
9893
if hasEntry && featureflag.RemoveNixpkgs.Enabled() {
94+
userSystem, err := nix.System()
95+
if err != nil {
96+
return nil, err
97+
}
9998
needsSysInfo = entry.Systems[userSystem] == nil
10099
}
101100

0 commit comments

Comments
 (0)