[logaling-commit] logaling/logaling-command [master] put error message if logaling-home not available

Back to archive index

null+****@clear***** null+****@clear*****
Mon Feb 27 18:22:06 JST 2012


SUZUKI Miho	2012-02-27 18:22:06 +0900 (Mon, 27 Feb 2012)

  New Revision: ff81c69710bd99765d9477b79affea9b37cb28c1

  Merged c1d041f: Merge pull request #54 from logaling/fix-loga-config

  Log:
    put error message if logaling-home not available

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

  Modified: lib/logaling/command/application.rb (+2 -0)
===================================================================
--- lib/logaling/command/application.rb    2012-02-29 16:40:07 +0900 (e3126f5)
+++ lib/logaling/command/application.rb    2012-02-27 18:22:06 +0900 (7d388c0)
@@ -84,6 +84,7 @@ module Logaling::Command
     desc 'import', 'Import external glossary'
     method_option "list", type: :boolean, default: false
     def import(external_glossary=nil)
+      check_logaling_home_exists
       require "logaling/external_glossary"
       Logaling::ExternalGlossary.load
       if options["list"]
@@ -103,6 +104,7 @@ module Logaling::Command
     def register
       @config.check_required_option("glossary" => "input glossary name '-g <glossary name>'")
       raise Logaling::CommandFailed, "Try 'loga new' first." unless File.exist?(@dotfile_path)
+      check_logaling_home_exists
 
       @repository.register(@dotfile_path, @config.glossary)
       @repository.index




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