Skip to content

Commit

Permalink
Print details of Invalid Template Repository error: metanorma/metanor…
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 10, 2023
1 parent c427853 commit ba6f0e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/metanorma/cli/git_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def remove!
def download
remove!
clone_git_template(options[:repo])
rescue Git::GitExecuteError
UI.say("Invalid template reoository!")
rescue Git::GitExecuteError => e
UI.say("Invalid template repository: #{e}!")
nil
end

Expand Down
3 changes: 2 additions & 1 deletion spec/metanorma/cli/git_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
Metanorma::Cli::GitTemplate.download("csd", repo: template_repo)
}

expect(output).to include("Invalid template reoository!")
expect(output).to include("Invalid template repository:")
expect(output).to include("Repository not found")
end
end
end

0 comments on commit ba6f0e3

Please sign in to comment.