Skip to content

fix: build failed with GOOS=windows#1

Merged
cfc4n merged 1 commit intomasterfrom
bugfix/windows_build_failed
Mar 27, 2025
Merged

fix: build failed with GOOS=windows#1
cfc4n merged 1 commit intomasterfrom
bugfix/windows_build_failed

Conversation

@cfc4n
Copy link
Copy Markdown
Member

@cfc4n cfc4n commented Mar 27, 2025

No description provided.

@cfc4n cfc4n added the bug Something isn't working label Mar 27, 2025
@cfc4n cfc4n requested a review from Copilot March 27, 2025 11:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR targets a build failure on Windows by cleaning up unused imports and consolidating duplicate code.

  • Removed the unused "strings" import and duplicate isAllowedCommand function from services/command_exec.go.
  • Added the isAllowedCommand implementation to services/command.go for centralized command validation.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
services/command_exec.go Removed duplicate isAllowedCommand function and unnecessary "strings" import.
services/command.go Introduced isAllowedCommand function for command validation.
Comments suppressed due to low confidence (1)

services/command.go:159

  • [nitpick] Consider adding unit tests for isAllowedCommand to cover both simple and piped command scenarios.
+// isAllowedCommand checks if the command is allowed based on the configuration.

@cfc4n cfc4n merged commit a94ebce into master Mar 27, 2025
6 checks passed
@cfc4n cfc4n deleted the bugfix/windows_build_failed branch March 27, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants