Skip to content

Commit 081771e

Browse files
cvclaude
andcommitted
fix: Remove t.Parallel from tests that modify os.Stderr
These tests modify os.Stderr to capture output, which is a global variable that cannot be safely accessed in parallel. Add nolint comments explaining why t.Parallel cannot be used. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 13cec54 commit 081771e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

internal/cli/root_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,10 @@ func TestExecute_WithRealSignal(t *testing.T) {
141141
}
142142
}
143143

144+
// TestCheckSkillVersionMismatch_SkipsSkillCommands tests that skill commands are skipped.
145+
//
146+
//nolint:paralleltest // This test modifies os.Stderr which is a global variable.
144147
func TestCheckSkillVersionMismatch_SkipsSkillCommands(t *testing.T) {
145-
t.Parallel()
146148
// Create a skill command with context containing config
147149
skillCmd := &cobra.Command{Use: "skill"}
148150
cfg := testCLIConfig()
@@ -166,8 +168,10 @@ func TestCheckSkillVersionMismatch_SkipsSkillCommands(t *testing.T) {
166168
assert.Empty(t, errBuf.String())
167169
}
168170

171+
// TestCheckSkillVersionMismatch_SkipsSkillSubcommands tests that skill subcommands are skipped.
172+
//
173+
//nolint:paralleltest // This test modifies os.Stderr which is a global variable.
169174
func TestCheckSkillVersionMismatch_SkipsSkillSubcommands(t *testing.T) {
170-
t.Parallel()
171175
// Create a skill subcommand (e.g., skill install)
172176
skillCmd := &cobra.Command{Use: "skill"}
173177
installCmd := &cobra.Command{Use: "install"}

0 commit comments

Comments
 (0)