Skip to content

Commit

Permalink
added better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Cerebrovinny committed Nov 19, 2024
1 parent 50ff73e commit 0f9cead
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/exec/vendor_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func ExecuteVendorPullCommand(cmd *cobra.Command, args []string) error {

// Check `vendor.yaml`
vendorConfig, vendorConfigExists, foundVendorConfigFile, err := ReadAndProcessVendorConfigFile(cliConfig, cfg.AtmosVendorConfigFileName)
if vendorConfigExists && err != nil {
if err != nil {
return err
}

Expand Down Expand Up @@ -153,7 +153,8 @@ func ReadAndProcessVendorConfigFile(

if !u.FileExists(pathToVendorConfig) {
vendorConfigFileExists = false
return vendorConfig, vendorConfigFileExists, "", fmt.Errorf("vendor config file or directory '%s' does not exist", pathToVendorConfig)
u.LogWarning(cliConfig, fmt.Sprintf("Vendor config file '%s' does not exist. Proceeding without vendor configurations", pathToVendorConfig))
return vendorConfig, vendorConfigFileExists, "", nil
}

foundVendorConfigFile = pathToVendorConfig
Expand Down

0 comments on commit 0f9cead

Please sign in to comment.