From bfe36fc3973bcd3e9eeda89c1ab4d8973aeb0b97 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Thu, 12 Sep 2024 09:16:29 +0200 Subject: [PATCH] Rework error now that we can no longer detect permission errors This was working a bit better before 26c3b421e84542e1fc59d292eb1f936528276010 --- bundle/deploy/lock/acquire.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/deploy/lock/acquire.go b/bundle/deploy/lock/acquire.go index ee47f7744..ab1f1cba1 100644 --- a/bundle/deploy/lock/acquire.go +++ b/bundle/deploy/lock/acquire.go @@ -61,7 +61,7 @@ func (m *acquire) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics if errors.As(err, ¬ExistsError) { // If we get a "doesn't exist" error from the API this indicates // we either don't have permissions or the path is invalid. - return diag.Errorf("cannot write to deployment root (this can indicate a previous deploy was done with a different identity): %s", b.Config.Workspace.RootPath) + return permissions.ReportPossiblePermissionDenied(ctx, b, b.Config.Workspace.StatePath) } return diag.FromErr(err)