Method: ShopifyCLI::Theme::Syncer#enqueueable?

Defined in:
lib/shopify_cli/theme/syncer.rb

#enqueueable?(operation) ⇒ Boolean

Returns:

  • (Boolean)


180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/shopify_cli/theme/syncer.rb', line 180

def enqueueable?(operation)
  file = operation.file
  method = operation.method

  # Already enqueued or ignored
  return false if @pending.include?(operation) || ignore_operation?(operation)

  if [:update, :get].include?(method) && file.exist?
    # File is fixed (and it has been never updated)
    if !!@error_checksums.delete(file.checksum)
      @standard_reporter.report(operation.as_fix_message)
    end

    return checksums.file_has_changed?(file)
  end

  true
end