1- From af0299d3f9ffb36b1f10b3c608b68301af664b1e Mon Sep 17 00:00:00 2001
1+ From 096dad878552ea342ddad9f3132453fd7cc4e08b Mon Sep 17 00:00:00 2001
22From: Kush Upadhyay <
[email protected] >
33Date: Mon, 7 Oct 2024 09:13:38 +0000
44Subject: [PATCH] agent: Add config to make shell optional
55
66Signed-off-by: Kush Upadhyay <
[email protected] >
7+ Signed-off-by: Yutong Sun <
[email protected] >
78---
89 agent/appconfig/appconfig.go | 1 +
910 agent/appconfig/contracts.go | 2 ++
1011 agent/plugins/runscript/runscript.go | 36 +++++++++++++++++++---------
1112 3 files changed, 28 insertions(+), 11 deletions(-)
1213
1314diff --git a/agent/appconfig/appconfig.go b/agent/appconfig/appconfig.go
14- index 021d9f2..867f9e0 100644
15+ index 6b278f50..2013cf92 100644
1516--- a/agent/appconfig/appconfig.go
1617+++ b/agent/appconfig/appconfig.go
17- @@ -119,6 +119,7 @@ func DefaultConfig() SsmagentConfig {
18- SessionLogsDestination: SessionLogsDestinationNone,
18+ @@ -120,6 +120,7 @@ func DefaultConfig() SsmagentConfig {
1919 PluginLocalOutputCleanup: DefaultPluginOutputRetention,
2020 OrchestrationDirectoryCleanup: DefaultOrchestrationDirCleanup,
21+ SessionHandshakeTimeoutSeconds: DefaultSessionHandshakeTimeoutSeconds,
2122+ UseShell: false,
2223 }
23- var agent = AgentInfo{
24+ agent : = AgentInfo{
2425 Name: "amazon-ssm-agent",
2526diff --git a/agent/appconfig/contracts.go b/agent/appconfig/contracts.go
26- index 687aed2..dcb8412 100644
27+ index 69501310..bf42380f 100644
2728--- a/agent/appconfig/contracts.go
2829+++ b/agent/appconfig/contracts.go
29- @@ -50 ,6 +50 ,8 @@ type SsmCfg struct {
30+ @@ -55 ,6 +55 ,8 @@ type SsmCfg struct {
3031 PluginLocalOutputCleanup string
3132 // Configure only when it is safe to delete orchestration folder after document execution. This config overrides PluginLocalOutputCleanup when set.
3233 OrchestrationDirectoryCleanup string
@@ -36,10 +37,10 @@ index 687aed2..dcb8412 100644
3637
3738 // AgentInfo represents metadata for amazon-ssm-agent
3839diff --git a/agent/plugins/runscript/runscript.go b/agent/plugins/runscript/runscript.go
39- index 48be5e7..d8cbcf1 100644
40+ index c89bf92a..b56e973a 100644
4041--- a/agent/plugins/runscript/runscript.go
4142+++ b/agent/plugins/runscript/runscript.go
42- @@ -174 ,23 +174 ,37 @@ func (p *Plugin) runCommands(pluginID string, pluginInput RunScriptPluginInput,
43+ @@ -177 ,23 +177 ,37 @@ func (p *Plugin) runCommands(pluginID string, pluginInput RunScriptPluginInput,
4344 return
4445 }
4546
@@ -89,5 +90,5 @@ index 48be5e7..d8cbcf1 100644
8990 exitCode, err := p.CommandExecuter.NewExecute(p.Context, workingDir, output.GetStdoutWriter(), output.GetStderrWriter(), cancelFlag, executionTimeout, commandName, commandArguments, pluginInput.Environment)
9091
9192- -
92- 2.40.1
93+ 2.47.0
9394
0 commit comments