Method: QB::Repo::Git#from_path!
- Defined in:
- lib/qb/repo/git.rb
#from_path!(path, use_github_api: false) ⇒ QB::Repo::Git
Instantiate a Package::Git resource for whatever Git repo path
is in, raising an error if it's not in one.
228 229 230 231 232 233 234 235 236 |
# File 'lib/qb/repo/git.rb', line 228 def from_path! path, use_github_api: false from_path( path, use_github_api: use_github_api ).tap { |git| if git.nil? raise QB::FSStateError, "Path #{ path.inspect } does not appear to be in a " + "Git repo." end } end |