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

Function UploadInstallableToCache

internal/devbox/cache.go:68–86  ·  view source on GitHub ↗
(
	ctx context.Context,
	stderr io.Writer,
	cacheURI, installable string,
)

Source from the content-addressed store, hash-verified

66}
67
68func UploadInstallableToCache(
69 ctx context.Context,
70 stderr io.Writer,
71 cacheURI, installable string,
72) error {
73 if cacheURI == "" {
74 var err error
75 cacheURI, err = getWriteCacheURI(ctx, stderr)
76 if err != nil {
77 return err
78 }
79 }
80
81 creds, err := nixcache.CachedCredentials(ctx)
82 if err != nil && !errors.Is(err, auth.ErrNotLoggedIn) {
83 return err
84 }
85 return nix.CopyInstallableToCache(ctx, stderr, cacheURI, installable, creds.Env())
86}
87
88func getWriteCacheURI(
89 ctx context.Context,

Callers 1

cacheCmdFunction · 0.92

Calls 5

CachedCredentialsFunction · 0.92
CopyInstallableToCacheFunction · 0.92
getWriteCacheURIFunction · 0.85
IsMethod · 0.80
EnvMethod · 0.65

Tested by

no test coverage detected