@@ -39,6 +39,11 @@ import (
3939type ContainerFindIncludes struct {}
4040
4141func (s * ContainerFindIncludes ) Run (context map [string ]interface {}) error {
42+ err := runCommand (context , & IncludesToIncludeFolders {})
43+ if err != nil {
44+ return utils .WrapError (err )
45+ }
46+
4247 sketch := context [constants .CTX_SKETCH ].(* types.Sketch )
4348 sketchBuildPath := context [constants .CTX_SKETCH_BUILD_PATH ].(string )
4449 wheelSpins := context [constants .CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH ].(int )
@@ -50,8 +55,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
5055 }
5156
5257 for _ , command := range commands {
53- PrintRingNameIfDebug (context , command )
54- err := command .Run (context )
58+ err := runCommand (context , command )
5559 if err != nil {
5660 return utils .WrapError (err )
5761 }
@@ -66,8 +70,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
6670 }
6771 }
6872
69- command := & CollectAllSourceFilesFromFoldersWithSources {}
70- err := command .Run (context )
73+ err = runCommand (context , & CollectAllSourceFilesFromFoldersWithSources {})
7174 if err != nil {
7275 return utils .WrapError (err )
7376 }
@@ -83,8 +86,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
8386 }
8487
8588 for _ , command := range commands {
86- PrintRingNameIfDebug (context , command )
87- err := command .Run (context )
89+ err := runCommand (context , command )
8890 if err != nil {
8991 return utils .WrapError (err )
9092 }
@@ -93,3 +95,12 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
9395
9496 return nil
9597}
98+
99+ func runCommand (context map [string ]interface {}, command types.Command ) error {
100+ PrintRingNameIfDebug (context , command )
101+ err := command .Run (context )
102+ if err != nil {
103+ return utils .WrapError (err )
104+ }
105+ return nil
106+ }
0 commit comments