Use target filepath instead of target dir path to upload targets
@@ -245,8 +245,8 @@ func (r *Runner) addTarget(location string) error {
if d.IsDir() || !strings.EqualFold(filepath.Ext(path), ".txt") {
return nil
}
- base := filepath.Base(location)
- reference, targetErr := r.cloudClient.AddTarget(base, location)
+ base := filepath.Base(path)
+ reference, targetErr := r.cloudClient.AddTarget(base, path)
if targetErr != nil {
gologger.Error().Msgf("Could not upload %s: %s", location, targetErr)
} else if reference != "" {
