Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,13 @@ func getChangeUuid(ctx context.Context, expectedStatus sdp.ChangeStatus, errNotF
if err != nil {
return uuid.Nil, fmt.Errorf("invalid --change value '%v', error: %w", changeUrlString, err)
}
changeUuid, err = uuid.Parse(path.Base(changeUrl.Path))
pathParts := strings.Split(path.Clean(changeUrl.Path), "/")
if len(pathParts) < 2 {
return uuid.Nil, fmt.Errorf("invalid --change value '%v', not long enough: %w", changeUrlString, err)
}
changeUuid, err = uuid.Parse(pathParts[1])
if err != nil {
return uuid.Nil, fmt.Errorf("invalid --change value '%v', couldn't parse: %w", changeUrlString, err)
return uuid.Nil, fmt.Errorf("invalid --change value '%v', couldn't parse UUID: %w", changeUrlString, err)
}

return changeUuid, nil
Expand Down