MCPcopy Index your code
hub / github.com/jetify-com/devbox / addOutputFromLegacyStorePath

Method addOutputFromLegacyStorePath

internal/lock/package.go:122–133  ·  view source on GitHub ↗

If we have a StorePath and no Outputs, we need to convert to the new format. Note: non-empty Outputs may have StorePath alongside it for backwards-compatibility but we should ignore that legacy StorePath.

()

Source from the content-addressed store, hash-verified

120// Note: non-empty Outputs may have StorePath alongside it for backwards-compatibility
121// but we should ignore that legacy StorePath.
122func (i *SystemInfo) addOutputFromLegacyStorePath() {
123 if i.StorePath != "" && len(i.Outputs) == 0 {
124 i.Outputs = []Output{
125 {
126 Default: true,
127 Name: "out",
128 Path: i.StorePath,
129 },
130 }
131 i.outputIsFromStorePath = true
132 }
133}
134
135// ensurePackagesHaveOutputs is used for backwards-compatibility with the old
136// lockfile format where each SystemInfo had a StorePath but no Outputs.

Callers 2

buildLockSystemInfosFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected