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

Function StorePathFromHashPart

internal/nix/store.go:19–26  ·  view source on GitHub ↗
(ctx context.Context, hash, storeAddr string)

Source from the content-addressed store, hash-verified

17)
18
19func StorePathFromHashPart(ctx context.Context, hash, storeAddr string) (string, error) {
20 cmd := Command("store", "path-from-hash-part", "--store", storeAddr, hash)
21 resultBytes, err := cmd.Output(ctx)
22 if err != nil {
23 return "", err
24 }
25 return strings.TrimSpace(string(resultBytes)), nil
26}
27
28func StorePathsFromInstallable(ctx context.Context, installable string, allowInsecure bool) ([]string, error) {
29 defer debug.FunctionTimer().End()

Callers 1

buildLockSystemInfosFunction · 0.92

Calls 2

CommandFunction · 0.70
OutputMethod · 0.45

Tested by

no test coverage detected