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

vagrantutil: fix parseRecords for vagrant 1.8+ #5

Merged
merged 4 commits into from
Mar 31, 2016

Conversation

rjeczalik
Copy link
Member

if data != "" {
break
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be simplified too:

    if typeName == record[2] && record[3] != "" {
        data = record[3]
        break
    }

Copy link
Member Author

Choose a reason for hiding this comment

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

done

// startCommand starts the command and sends back both the stdout and stderr to
// the returned channel. Any error happened during the streaming is passed to
// the Error field.
func startCommand(cmd *exec.Cmd) (<-chan *CommandOutput, error) {
func (v *Vagrant) startCommand(cmd *exec.Cmd) (<-chan *CommandOutput, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for this, no need to make it a method of *Vagrant. It would make it easier to implement tests

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd need to add another argument for logging the command's ouput - startCommand(cmd *exec.Cmd, log fn(string)) - is it worth it?

@sent-hil sent-hil merged commit 259a05e into koding:master Mar 31, 2016
@rjeczalik rjeczalik deleted the parse-fix branch March 31, 2016 06:16
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.

None yet

3 participants