From a93f55569950b714a3d1235e59ad0a7d5b88f938 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 26 Apr 2019 18:18:09 +0900 Subject: [PATCH] tool/sync_default_gems.rb: Check prerequisites --- tool/sync_default_gems.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index e7917f7bec..2bef1c621c 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -208,6 +208,9 @@ def sync_default_gems(gem) end def sync_lib(repo) + unless File.directory?("../#{repo}") + abort "Expected '../#{repo}' (#{File.expand_path("../#{repo}")}) to be a directory, but it wasn't." + end `rm -rf lib/#{repo}.rb lib/#{repo}/* test/test_#{repo}.rb` `cp -rf ../#{repo}/lib/* lib` tests = if File.directory?("test/#{repo}")