summaryrefslogtreecommitdiff
path: root/bin/gitano-auth.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/gitano-auth.in')
-rw-r--r--bin/gitano-auth.in17
1 files changed, 5 insertions, 12 deletions
diff --git a/bin/gitano-auth.in b/bin/gitano-auth.in
index 8a91ae3..3901166 100644
--- a/bin/gitano-auth.in
+++ b/bin/gitano-auth.in
@@ -18,6 +18,7 @@ local sp = require "luxio.subprocess"
-- @@GITANO_BIN_PATH
-- @@GITANO_SHARE_PATH
+-- @@GITANO_PLUGIN_PATH
local repo_root, username, keytag = ...
@@ -104,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