mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: add agent exec abstraction (#15717)
This commit is contained in:
+2
-2
@@ -503,7 +503,7 @@ func noExecInAgent(m dsl.Matcher) {
|
||||
!m.File().PkgPath.Matches("/agentexec") &&
|
||||
!m.File().Name.Matches(`_test\.go$`),
|
||||
).
|
||||
Report("The agent and its subpackages should not use exec.Command or exec.CommandContext directly. Consider using agentexec.CommandContext instead.")
|
||||
Report("The agent and its subpackages should not use exec.Command or exec.CommandContext directly. Consider using an agentexec.Execer instead.")
|
||||
}
|
||||
|
||||
// noPTYInAgent ensures that packages under agent/ don't use pty.Command or
|
||||
@@ -521,5 +521,5 @@ func noPTYInAgent(m dsl.Matcher) {
|
||||
!m.File().PkgPath.Matches(`/agentexec`) &&
|
||||
!m.File().Name.Matches(`_test\.go$`),
|
||||
).
|
||||
Report("The agent and its subpackages should not use pty.Command or pty.CommandContext directly. Consider using agentexec.PTYCommandContext instead.")
|
||||
Report("The agent and its subpackages should not use pty.Command or pty.CommandContext directly. Consider using an agentexec.Execer instead.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user