File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 366366
367367# # Modules
368368
369+ ` WHEN ADDING OR EDITING NEW MODULE, ALWAYS ADD OR MODIFY ITS CUE SCHEMA`
370+
369371# ## ping
370372
371373A trivial test module to verify SSH connectivity. Returns "pong" on success.
Original file line number Diff line number Diff line change @@ -142,7 +142,11 @@ func main() {
142142 if invPath == "" && cfg .Inventory != "" {
143143 invPath = cfg .Inventory
144144 if ! filepath .IsAbs (invPath ) {
145- invPath = filepath .Join (filepath .Dir (* configPath ), invPath )
145+ baseDir := filepath .Dir (* configPath )
146+ if info , err := os .Stat (* configPath ); err == nil && info .IsDir () {
147+ baseDir = * configPath
148+ }
149+ invPath = filepath .Join (baseDir , invPath )
146150 }
147151 }
148152
Original file line number Diff line number Diff line change @@ -172,6 +172,9 @@ func schemaOverlay(baseDir string) map[string]load.Source {
172172 if moduleRoot == "" {
173173 moduleRoot = baseDir
174174 }
175+ if absRoot , err := filepath .Abs (moduleRoot ); err == nil {
176+ moduleRoot = absRoot
177+ }
175178 modulePath := "dibra.dev"
176179
177180 for _ , entry := range entries {
You can’t perform that action at this time.
0 commit comments