diff --git a/lib/shopify_theme/cli.rb b/lib/shopify_theme/cli.rb index 23b8733..e9f8d32 100644 --- a/lib/shopify_theme/cli.rb +++ b/lib/shopify_theme/cli.rb @@ -141,7 +141,7 @@ def replace(*keys) # files present on remote and present locally get overridden anyway remote_assets = keys.empty? ? (ShopifyTheme.asset_list - local_assets_list) : keys remote_assets.each do |asset| - delete_asset(asset, options['quiet']) unless ShopifyTheme.ignore_files.any? { |regex| regex =~ asset } + delete_asset(asset, options['quiet']) unless ShopifyTheme.ignore_files.any? { |regex| /#{regex}/ =~ asset } end local_assets = keys.empty? ? local_assets_list : keys local_assets.each do |asset|