Skip to content

Commit 317492f

Browse files
committed
fix: Make error message more generic, so is applicable to backend and cloud blocks.
1 parent 29ee266 commit 317492f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/command/meta_backend_errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type errWrongWorkspaceForPlan struct {
1717
}
1818

1919
func (e *errWrongWorkspaceForPlan) Error() string {
20-
return fmt.Sprintf(`The plan file describes changes to the %q workspace, but the %q workspace is currently selected in the working directory.
20+
return fmt.Sprintf(`The plan file describes changes to the %q workspace, but the %q workspace is currently in use.
2121
2222
Applying this plan with the incorrect workspace selected could result in state being stored in an unexpected location, or a downstream error
2323
when Terraform attempts apply a plan using the other workspace's state.

internal/command/meta_backend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ func TestMetaBackend_planLocal_mismatchedWorkspace(t *testing.T) {
18721872
if !diags.HasErrors() {
18731873
t.Fatalf("expected an error but got none: %s", diags.ErrWithWarnings())
18741874
}
1875-
expectedMsg := fmt.Sprintf("The plan file describes changes to the %q workspace, but the %q workspace is currently selected in the working directory",
1875+
expectedMsg := fmt.Sprintf("The plan file describes changes to the %q workspace, but the %q workspace is currently in use",
18761876
defaultWorkspace,
18771877
selectedWorkspace,
18781878
)

0 commit comments

Comments
 (0)