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 pip executing on every run #152

Merged
merged 1 commit into from
Jul 24, 2019
Merged

Fix pip executing on every run #152

merged 1 commit into from
Jul 24, 2019

Conversation

surajbarkale
Copy link
Contributor

The version check used is notoperator. Since is not checks if the instances are same and does not compare strings, pip was always invoked whenever gauge run is executed.

This patch changes is not to != which correctly compares strings. A check is added to properly report error when plugin is not installed.

Apart from this fix, the subprocess.check_output function is used as it will detect subprocess failures and properly raise exception.

The version check used `is not`operator. Since `is not` checks  if the
instances are same and does not compare strings, pip was always invoked
whenever `gauge run` is executed.

This patch changes `is not` to `!=` which correctly compares strings. A
check is added to properly report error when plugin is not installed.

The `subprocess.check_output`  function is used as it will detect
subprocess failures and raise exception.
@surajbarkale
Copy link
Contributor Author

This is an annoyance in docker images where pip is executed on every run. The existing code did not check for pip failures so I could execute tests.

@Apoorva-GA Apoorva-GA merged commit c2a7c28 into getgauge:master Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants