Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #309 #310

Merged
merged 2 commits into from
Jul 5, 2015
Merged

Fix for #309 #310

merged 2 commits into from
Jul 5, 2015

Conversation

13k
Copy link
Contributor

@13k 13k commented May 2, 2015

The issue this PR tries to solve is better explained in #309.

Feedback is appreciated, specially regarding tests. I didn't test Mina::LocalHelpers#local because I didn't know how to setup the rake scope accordingly. Also I didn't test the return value when term_mode == :exec because, well... Kernel.exec doesn't return.

system code
$?.to_i
Kernel.system code
$?.exitstatus
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here $? is a Process::Status instance that represents a 16-bit integer that ruby got from the system. Process::Status#to_i returns the whole 16-bit integer and has no meaning by itself. It coincidently is 0 when the command exits with status 0, but when it exits with anything else, it's not usable, so I changed it to use Process::Status#exitstatus which returns the least significant 8-bits, which is the process exit status.

d4be4st added a commit that referenced this pull request Jul 5, 2015
@d4be4st d4be4st merged commit 91c292b into mina-deploy:master Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants