@@ -39,6 +39,11 @@ import (
39
39
type ContainerFindIncludes struct {}
40
40
41
41
func (s * ContainerFindIncludes ) Run (context map [string ]interface {}) error {
42
+ err := runCommand (context , & IncludesToIncludeFolders {})
43
+ if err != nil {
44
+ return utils .WrapError (err )
45
+ }
46
+
42
47
sketch := context [constants .CTX_SKETCH ].(* types.Sketch )
43
48
sketchBuildPath := context [constants .CTX_SKETCH_BUILD_PATH ].(string )
44
49
wheelSpins := context [constants .CTX_LIBRARY_DISCOVERY_RECURSION_DEPTH ].(int )
@@ -50,8 +55,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
50
55
}
51
56
52
57
for _ , command := range commands {
53
- PrintRingNameIfDebug (context , command )
54
- err := command .Run (context )
58
+ err := runCommand (context , command )
55
59
if err != nil {
56
60
return utils .WrapError (err )
57
61
}
@@ -66,8 +70,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
66
70
}
67
71
}
68
72
69
- command := & CollectAllSourceFilesFromFoldersWithSources {}
70
- err := command .Run (context )
73
+ err = runCommand (context , & CollectAllSourceFilesFromFoldersWithSources {})
71
74
if err != nil {
72
75
return utils .WrapError (err )
73
76
}
@@ -83,8 +86,7 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
83
86
}
84
87
85
88
for _ , command := range commands {
86
- PrintRingNameIfDebug (context , command )
87
- err := command .Run (context )
89
+ err := runCommand (context , command )
88
90
if err != nil {
89
91
return utils .WrapError (err )
90
92
}
@@ -93,3 +95,12 @@ func (s *ContainerFindIncludes) Run(context map[string]interface{}) error {
93
95
94
96
return nil
95
97
}
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