diff --git a/internal/exec/vendor_utils.go b/internal/exec/vendor_utils.go index c51ff6223..4bac66a06 100644 --- a/internal/exec/vendor_utils.go +++ b/internal/exec/vendor_utils.go @@ -83,7 +83,7 @@ func ExecuteVendorPullCommand(cmd *cobra.Command, args []string) error { // Check `vendor.yaml` vendorConfig, vendorConfigExists, foundVendorConfigFile, err := ReadAndProcessVendorConfigFile(cliConfig, cfg.AtmosVendorConfigFileName) - if err != nil { + if vendorConfigExists && err != nil { return err } @@ -551,11 +551,6 @@ func ExecuteAtmosVendorInternal( } } - targetDir := filepath.Dir(targetPath) - if err := os.MkdirAll(targetDir, 0755); err != nil { - return fmt.Errorf("failed to create target directory '%s': %w", targetDir, err) - } - if err = cp.Copy(tempDir, targetPath, copyOptions); err != nil { return err }