// Now we know the specific version of each path@vers.
// The final build list will be the union of three build lists:
// 1. the original build list
- // 2. the modules named on the command line
+ // 2. the modules named on the command line (other than @none)
// 3. the upgraded requirements of those modules (if upgrading)
// Start building those lists.
// This loop collects (2).
continue // already added
}
byPath[t.m.Path] = t
- named = append(named, t.m)
+ if t.m.Version != "none" {
+ named = append(named, t.m)
+ }
}
base.ExitIfErrors()
--- /dev/null
+env GO111MODULE=on
+
+go mod init example.com/foo
+
+# 'go get bar@none' should be a no-op if module bar is not active.
+go get example.com/bar@none
+go list -m all
+! stdout example.com/bar
+
+go get example.com/bar@none
+go list -m all
+! stdout example.com/bar