[Groonga-commit] ranguba/groonga-client-model at b062017 [master] Add file existence check to groonga:schema:load

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Mar 21 14:15:09 JST 2017


Kouhei Sutou	2017-03-21 14:15:09 +0900 (Tue, 21 Mar 2017)

  New Revision: b062017f365e6ff1a3a2d9328b948e84574fbb02
  https://github.com/ranguba/groonga-client-model/commit/b062017f365e6ff1a3a2d9328b948e84574fbb02

  Message:
    Add file existence check to groonga:schema:load

  Modified files:
    lib/groonga_client_model/railties/groonga.rake

  Modified: lib/groonga_client_model/railties/groonga.rake (+3 -0)
===================================================================
--- lib/groonga_client_model/railties/groonga.rake    2017-03-21 14:11:17 +0900 (b442e60)
+++ lib/groonga_client_model/railties/groonga.rake    2017-03-21 14:15:09 +0900 (6525c7d)
@@ -32,6 +32,9 @@ namespace :groonga do
     desc "Loads #{schema_path} into the Groonga database"
     task load: ["config:load"] do
       full_schema_path = Rails.root + schema_path
+      unless full_schema_path.exist?
+        raise "Schema file doesn't exist: #{full_schema_path}"
+      end
       schema_loader = GroongaClientModel::SchemaLoader.new(full_schema_path)
       schema_loader.load
     end
-------------- next part --------------
HTML����������������������������...
Download 



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