File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -518,12 +518,6 @@ func Parse(
518518		// Treat include-only/no-settings configs as non-fatal during discovery when suppression is enabled 
519519		if  suppressParseErrors  &&  containsNoSettingsError (err ) {
520520			l .Debugf ("Skipping include-only config during discovery: %s" , parseOpts .TerragruntConfigPath )
521- 
522- 			// Store an empty partial config to avoid nil dereferences in subsequent dependency discovery 
523- 			if  unit , ok  :=  c .(* component.Unit ); ok  {
524- 				unit .StoreConfig (& config.TerragruntConfig {IsPartial : true })
525- 			}
526- 
527521			return  nil 
528522		}
529523
@@ -1178,6 +1172,12 @@ func (d *DependencyDiscovery) DiscoverDependencies(
11781172	}
11791173
11801174	terragruntCfg  :=  unit .Config ()
1175+ 	if  terragruntCfg  ==  nil  {
1176+ 		// Config is still nil after parsing (e.g., include-only config with suppressParseErrors) 
1177+ 		// No dependencies to discover 
1178+ 		return  nil 
1179+ 	}
1180+ 
11811181	dependencyBlocks  :=  terragruntCfg .TerragruntDependencies 
11821182
11831183	depPaths  :=  make ([]string , 0 , len (dependencyBlocks ))
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments