From 5cbbd6e154fd2a03d71135f223465a1d045f73a6 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sun, 26 Jan 2025 18:51:34 -0500 Subject: [PATCH] fix: Fix persistent state mode for commands that execute templates --- internal/cmd/ignoredcmd.go | 2 +- internal/cmd/sourcepathcmd.go | 2 +- internal/cmd/targetpathcmd.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/cmd/ignoredcmd.go b/internal/cmd/ignoredcmd.go index a76ee1f400f..cc9e90bf94c 100644 --- a/internal/cmd/ignoredcmd.go +++ b/internal/cmd/ignoredcmd.go @@ -19,7 +19,7 @@ func (c *Config) newIgnoredCmd() *cobra.Command { Args: cobra.NoArgs, RunE: c.makeRunEWithSourceState(c.runIgnoredCmd), Annotations: newAnnotations( - persistentStateModeReadOnly, + persistentStateModeReadMockWrite, ), } diff --git a/internal/cmd/sourcepathcmd.go b/internal/cmd/sourcepathcmd.go index 9748dc2d9fc..6eb2725e27f 100644 --- a/internal/cmd/sourcepathcmd.go +++ b/internal/cmd/sourcepathcmd.go @@ -16,7 +16,7 @@ func (c *Config) newSourcePathCmd() *cobra.Command { ValidArgsFunction: c.targetValidArgs, RunE: c.runSourcePathCmd, Annotations: newAnnotations( - persistentStateModeReadOnly, + persistentStateModeReadMockWrite, ), } diff --git a/internal/cmd/targetpathcmd.go b/internal/cmd/targetpathcmd.go index 9cc6e5201d1..7ead354bdc6 100644 --- a/internal/cmd/targetpathcmd.go +++ b/internal/cmd/targetpathcmd.go @@ -16,7 +16,7 @@ func (c *Config) newTargetPathCmd() *cobra.Command { Example: example("target-path"), RunE: c.runTargetPathCmd, Annotations: newAnnotations( - persistentStateModeReadOnly, + persistentStateModeReadMockWrite, ), }