diff --git a/internal/devbox/providers/nixcache/nixcache.go b/internal/devbox/providers/nixcache/nixcache.go index 550bc165287..768aff7f667 100644 --- a/internal/devbox/providers/nixcache/nixcache.go +++ b/internal/devbox/providers/nixcache/nixcache.go @@ -205,7 +205,9 @@ func (p *Provider) URI(ctx context.Context) (string, error) { if err != nil { return "", redact.Errorf("nixcache: get uri: %w", redact.Safe(err)) } - checkIfUserCanAddSubstituter(ctx) + if uri != "" { + checkIfUserCanAddSubstituter(ctx) + } return uri, nil }