Rework error now that we can no longer detect permission errors

This was working a bit better before 26c3b421e8
This commit is contained in:
Lennart Kats 2024-09-12 09:16:29 +02:00
parent 3b33d8ce65
commit bfe36fc397
No known key found for this signature in database
GPG Key ID: 1EB8B57673197023
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ func (m *acquire) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics
if errors.As(err, &notExistsError) {
// 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)