Skip to content

Commit

Permalink
fix: panic when run on docker compose single service sample because […
Browse files Browse the repository at this point in the history
…]interface{} is not []string (#1003)

Signed-off-by: Harikrishnan Balagopal <[email protected]>
  • Loading branch information
HarikrishnanBalagopal authored Apr 3, 2023
1 parent 306af30 commit 7fabe36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transformer/compose/composeanalyser.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ func (t *ComposeAnalyser) Transform(newArtifacts []transformertypes.Artifact, al
logrus.Debugf("failed to load config for Transformer into %T . Error: %q", imageName, err)
}
ir := irtypes.NewIR()
composeFiles := newArtifact.Configs[ComposeFileConfigType].([]string)
composeFiles := []string{}
if err := newArtifact.GetConfig(ComposeFileConfigType, &composeFiles); err != nil {
logrus.Errorf("failed to get the compose files from the artifact. Error: %+q", err)
continue
}
for _, composeFileName := range composeFiles {
composeFilePath := filepath.Join(newArtifact.Paths[dockerComposeContextPathType][0], composeFileName)
logrus.Debugf("file at path '%s' being loaded from the compose service name '%s'", composeFilePath, config.ServiceName)
Expand Down

0 comments on commit 7fabe36

Please sign in to comment.