From 223a3cc41cd333bd32955edd3dfb1240868e51e9 Mon Sep 17 00:00:00 2001 From: Greg Curtis Date: Mon, 8 Apr 2024 17:32:48 -0400 Subject: [PATCH] nixcache: only print warning if URI isn't empty --- internal/devbox/providers/nixcache/nixcache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }