Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Paperclip#run now respects swallow_stderr setting. Fix for #741 #742

Conversation

apolzon
Copy link

@apolzon apolzon commented Feb 15, 2012

Paperclip will now merge in the swallow_stderr option when calling Cocaine::CommandLine.new in Paperclip#run.

Not overriding swallow_stderr if it is passed in to Paperclip#run.

@apolzon
Copy link
Author

apolzon commented Feb 16, 2012

This is a dupe of #741. Not sure what I did to create two copies of this issue, sorry.

@sikachu
Copy link
Contributor

sikachu commented Feb 17, 2012

Nah, that's fine. It's ok to open one issue and one PR.

sikachu added a commit that referenced this pull request Feb 17, 2012
…en_running_commands

Paperclip#run now respects swallow_stderr setting. Fix for #741
@sikachu sikachu merged commit 6fca437 into thoughtbot:master Feb 17, 2012
@@ -99,6 +99,7 @@ def run(cmd, arguments = "", local_options = {})
command_path = options[:command_path] || options[:image_magick_path]
Cocaine::CommandLine.path = ( Cocaine::CommandLine.path ? [Cocaine::CommandLine.path, command_path ].flatten : command_path )
local_options = local_options.merge(:logger => logger) if logging? && (options[:log_command] || local_options[:log_command])
local_options = local_options.merge(:swallow_stderr => options[:swallow_stderr]) if !local_options[:swallow_stderr] && !options[:swallow_stderr].nil?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very long line with an if modifier, which is basically impossible to read. Can you split this down more?

@mike-burns
Copy link
Member

I reverted this because the test fails.

Note to those with commit access: don't pull ugly code.

@sikachu
Copy link
Contributor

sikachu commented Feb 24, 2012

Ok then.

@apolzon
Copy link
Author

apolzon commented Feb 24, 2012

Sorry guys. Was trying to get it working changing the minimal amount of code. I can fix it up and re-push. Not sure what caused those test failures; I ran the tests locally and all passed (and saw it pull gemfiles for all tested rails versions).

As a side-note, I've worked around this temporarily by using AS3.1's quietly{} Kernel method.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants