Skip to content

Conversation

@laines-it
Copy link
Collaborator

It seems that is the --version output
sometimes goes to Stderr instead of Stdout.

In IsTarantoolVersionLess() added CombinedOutput (stdout+stderr),
if exec.Cmd.Output() returned ""
while executing tarantool --version.

Closes #503

It seems that is the --version output
sometimes goes to Stderr instead of Stdout.

In IsTarantoolVersionLess() added CombinedOutput (stdout+stderr),
if exec.Cmd.Output() returned ""
while executing `tarantool --version`.

Closes #503
Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Thank you for the patch. But I don't get the idea clearly.

Why could not we just replace the exec.Command(getTarantoolExec(), "--version").Output() with exec.Command(getTarantoolExec(), "--version").CombinedOutput(). Is there any reason for left the first call?

out, err := exec.Command(getTarantoolExec(), "--version").Output()

}

// It seems that is the --version output sometimes goes to Stderr instead of Stdout.
if string(out) == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a simpler comparison from a reader point of view.

Suggested change
if string(out) == "" {
if len(out) == 0 {

@oleg-jukovec oleg-jukovec requested a review from bigbes December 7, 2025 11:52
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.

tests: flaky TestGracefulShutdown

3 participants