diff options
Diffstat (limited to 'bin/gitano-auth.in')
-rw-r--r-- | bin/gitano-auth.in | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/bin/gitano-auth.in b/bin/gitano-auth.in index 55712f4..3901166 100644 --- a/bin/gitano-auth.in +++ b/bin/gitano-auth.in @@ -105,18 +105,10 @@ if not cmd then gitano.log.fatal("Unknown command: " .. parsed_cmdline[1]) end -if cmd.takes_repo and #parsed_cmdline > 1 then - -- Acquire the repository object for the target repo - local msg - repo, msg = gitano.repository.find(config, parsed_cmdline[2]) - if not repo then - gitano.log.critical("Unable to locate repository.") - gitano.log.critical(" * " .. (tostring(msg))) - gitano.log.fatal("Cannot continue") - end - - if repo.is_nascent then - gitano.log.info("Repository " .. repo.name .. " is nascent") +if cmd.takes_repo then + repo, parsed_cmdline = cmd.detect_repo(config, parsed_cmdline) + if not repo and not parsed_cmdline then + gitano.log.fatal("Failed to acquire repository object") end end |