Skip to content

Commit f8ad421

Browse files
Input parameter still needs to be RunCommand for json marshaling
cr https://cr.amazon.com/r/6458811/
1 parent 135418b commit f8ad421

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

agent/plugins/runscript/runscript.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type Plugin struct {
4848
// RunScriptPluginInput represents one set of commands executed by the RunScript plugin.
4949
type RunScriptPluginInput struct {
5050
contracts.PluginInput
51-
RunScript []string
51+
RunCommand []string
5252
ID string
5353
WorkingDirectory string
5454
TimeoutSeconds interface{}
@@ -145,7 +145,7 @@ func (p *Plugin) runCommands(log log.T, pluginInput RunScriptPluginInput, orches
145145

146146
// TODO:MF: This subdirectory is only needed because we could be running multiple sets of properties for the same plugin - otherwise the orchestration directory would already be unique
147147
orchestrationDir := fileutil.BuildPath(orchestrationDirectory, pluginInput.ID)
148-
log.Debugf("Running commands %v in workingDirectory %v; orchestrationDir %v ", pluginInput.RunScript, workingDir, orchestrationDir)
148+
log.Debugf("Running commands %v in workingDirectory %v; orchestrationDir %v ", pluginInput.RunCommand, workingDir, orchestrationDir)
149149

150150
// create orchestration dir if needed
151151
if err = fileutil.MakeDirsWithExecuteAccess(orchestrationDir); err != nil {
@@ -158,7 +158,7 @@ func (p *Plugin) runCommands(log log.T, pluginInput RunScriptPluginInput, orches
158158
log.Debugf("Writing commands %v to file %v", pluginInput, scriptPath)
159159

160160
// Create script file
161-
if err = pluginutil.CreateScriptFile(log, scriptPath, pluginInput.RunScript); err != nil {
161+
if err = pluginutil.CreateScriptFile(log, scriptPath, pluginInput.RunCommand); err != nil {
162162
out.MarkAsFailed(log, fmt.Errorf("failed to create script file. %v", err))
163163
return
164164
}

agent/plugins/runscript/runscript_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func generateTestCaseOk(id string) TestCase {
6666

6767
testCase := TestCase{
6868
Input: RunScriptPluginInput{
69-
RunScript: []string{"echo " + id},
69+
RunCommand: []string{"echo " + id},
7070
ID: id + ".aws:runScript",
7171
WorkingDirectory: "Dir" + id,
7272
TimeoutSeconds: "1",

0 commit comments

Comments
 (0)