Skip to content

Commit f4c0eab

Browse files
committed
clarify the why of ModifyCommand
1 parent 3127cba commit f4c0eab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

agent/agentssh/agentssh.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,9 @@ func (s *Server) CreateCommand(ctx context.Context, script string, env []string,
763763
}
764764
}
765765

766-
// Modify command prior to execution. This will usually be a no-op, but not always.
766+
// Modify command prior to execution. This will usually be a no-op, but not
767+
// always. For example, to run a command in a Docker container, we need to
768+
// modify the command to be `docker exec -it <container> <command>`.
767769
modifiedName, modifiedArgs := ei.ModifyCommand(name, args...)
768770
// Log if the command was modified.
769771
if modifiedName != name && slices.Compare(modifiedArgs, args) != 0 {

0 commit comments

Comments
 (0)