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

Update usage of passthru in Quicksilver to check return_var #5696

Closed
marfillaster opened this issue May 6, 2020 · 4 comments
Closed

Update usage of passthru in Quicksilver to check return_var #5696

marfillaster opened this issue May 6, 2020 · 4 comments
Assignees
Labels
Source: CSE Contribution from Customer Success Engineers Source: Pantheor Contribution from within Pantheon, unspecified team

Comments

@marfillaster
Copy link
Contributor

marfillaster commented May 6, 2020

Re: Database Workflow Tool, Fix Broken Links in WordPress

Priority: Medium

Issue Description:

The passthru usage for fixing broken links will result in a false positive if wp cli returns with non-zero exit code.

Suggested Resolution:

Check &$return_var value and raise an error to propagate the error to the calling quicksilver script.

$cmd = 'wp search-replace "://test-example.pantheonsite.io" "://example.com" --all-tables ';
passthru($cmd . ' 2>&1', $exit);
if (0 !== $exit) {
  trigger_error(sprintf('Command "%s" exit status: %s', $cmd, $exit), E_USER_ERROR);
}
@marfillaster
Copy link
Contributor Author

Also created issue on pantheon-systems/quicksilver-examples/issues/169

@alexfornuto alexfornuto added the Source: CSE Contribution from Customer Success Engineers label May 6, 2020
@alexfornuto
Copy link
Contributor

CC @pantheon-systems/devrel

@alexfornuto
Copy link
Contributor

Moving to not ready until the discussion in pantheon-systems/quicksilver-examples#169 creates a resolution we can duplicate.

@alexfornuto alexfornuto added the Source: Pantheor Contribution from within Pantheon, unspecified team label Jul 1, 2020
@EdwardAngert
Copy link
Contributor

closing as stale until pantheon-systems/quicksilver-examples#169 is resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: CSE Contribution from Customer Success Engineers Source: Pantheor Contribution from within Pantheon, unspecified team
Projects
None yet
Development

No branches or pull requests

5 participants