[logaling-commit] logaling/logaling-command [fix-show-with-dup-glossary] Fix problem on 'show' when projects with duplicate name exist

Back to archive index

SHIMADA Koji null+****@clear*****
Thu Aug 16 19:41:29 JST 2012


SHIMADA Koji	2012-08-16 19:41:29 +0900 (Thu, 16 Aug 2012)

  New Revision: e21dc81d3b8643eae8e5311a45325a27433f85f7
  https://github.com/logaling/logaling-command/commit/e21dc81d3b8643eae8e5311a45325a27433f85f7

  Log:
    Fix problem on 'show' when projects with duplicate name exist

  Modified files:
    lib/logaling/command/application.rb

  Modified: lib/logaling/command/application.rb (+3 -4)
===================================================================
--- lib/logaling/command/application.rb    2012-08-16 19:28:42 +0900 (eb4e6fc)
+++ lib/logaling/command/application.rb    2012-08-16 19:41:29 +0900 (74e41db)
@@ -318,9 +318,8 @@ module Logaling::Command
       }
       @config.check_required_option(required_options)
       check_logaling_home_exists
-      project =****@repos*****_project(@config.glossary)
-      raise Logaling::ProjectNotFound unless project
-      glossary = project.glossary(@config.source_language, @config.target_language)
+      glossary =****@repos*****_glossary(@config.glossary, @config.source_language, @config.target_language)
+      raise Logaling::GlossaryNotFound unless glossary
       terms = glossary.terms(options["annotation"])
       unless terms.empty?
         run_pager
@@ -335,7 +334,7 @@ module Logaling::Command
       end
     rescue Logaling::CommandFailed, Logaling::GlossaryDBNotFound => e
       say e.message
-    rescue Logaling::ProjectNotFound
+    rescue Logaling::GlossaryNotFound
       say "glossary <#{@config.glossary}> not found."
       say "Try 'loga list' and confirm glossary name."
     end
-------------- next part --------------
An HTML attachment was scrubbed...
Télécharger 



More information about the logaling-commit mailing list
Back to archive index