lib/bakery/options/options.rb in bake-toolkit-2.60.2 vs lib/bakery/options/options.rb in bake-toolkit-2.61.0
- old
+ new
@@ -89,13 +89,17 @@
check_valid_dir(dir)
@collection_dir = File.expand_path(dir.gsub(/[\\]/,'/'))
end
def set_root(dir)
- root = Root.extract_depth(dir)
- check_valid_dir(root.dir)
- root.dir = File.expand_path(root.dir.gsub(/[\\]/,'/'))
- @roots << root
+ if File.file?(dir)
+ @roots += Root.calc_roots_bake(dir)
+ else
+ root = Root.extract_depth(dir)
+ check_valid_dir(root.dir)
+ root.dir = File.expand_path(root.dir.gsub(/[\\]/,'/'))
+ @roots << root
+ end
end
end
end