Skip to content

Commit

Permalink
(VANAGON-235) Specify which URL is invalid
Browse files Browse the repository at this point in the history
Vanagon::Component::Source::Git will throw an error message during
initialization if it thinks that the passed url is invalid.

Make a change to the error message to specify which url it was
reporting as invalid.
  • Loading branch information
e-gris committed Nov 9, 2023
1 parent fcf0bdb commit cb198d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This changelog adheres to [Keep a CHANGELOG](https://keepachangelog.com).
### Added
- (PA-5786) Add `postinstall_required_actions` forcing scriptlets to run in the %post section for rpm

### Changed
- (VANAGON-235) Report the actual URL when a Git URL is deemed invalid.

## [0.41.0] - 2023-10-26
### Added
- (VANAGON-231) Added amazon linux 2023 platform for intel & arm
Expand Down
2 changes: 1 addition & 1 deletion lib/vanagon/component/source/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def initialize(url, workdir:, **options) # rubocop:disable Metrics/AbcSize
@clone_options = opts[:clone_options] ||= {}

# We can test for Repo existence without cloning
raise Vanagon::InvalidRepo, "url is not a valid Git repo" unless valid_remote?
raise Vanagon::InvalidRepo, "\"#{url}\" is not a valid Git repo" unless valid_remote?
end

# Fetch the source. In this case, clone the repository into the workdir
Expand Down

0 comments on commit cb198d0

Please sign in to comment.