MCPcopy
hub / github.com/jetify-com/devbox / ConfigHash

Method ConfigHash

internal/devbox/devbox.go:189–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189func (d *Devbox) ConfigHash() (string, error) {
190 h, err := d.cfg.Hash()
191 if err != nil {
192 return "", err
193 }
194
195 buf := bytes.Buffer{}
196 buf.WriteString(h)
197 for _, pkg := range d.AllPackages() {
198 buf.WriteString(pkg.Hash())
199 }
200 for _, pluginConfig := range d.cfg.IncludedPluginConfigs() {
201 h, err := pluginConfig.Hash()
202 if err != nil {
203 return "", err
204 }
205 buf.WriteString(h)
206 }
207 return cachehash.Bytes(buf.Bytes()), nil
208}
209
210func (d *Devbox) Stdenv() flake.Ref {
211 return flake.Ref{

Callers 1

updateLockfileMethod · 0.95

Calls 5

AllPackagesMethod · 0.95
BytesFunction · 0.92
IncludedPluginConfigsMethod · 0.80
BytesMethod · 0.80
HashMethod · 0.65

Tested by

no test coverage detected