-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Mutagen sync command indefinite wait fix #100
Conversation
…mand if found, instead of indefinitely waiting
commands/sync.cmd
Outdated
if mutagen sync list --label-selector "warden-sync=${WARDEN_ENV_NAME}" \ | ||
| grep -i 'Last error' > /dev/null; then | ||
>&2 printf "\033[31\nmmutagen encountered an error during sync.\033[0m" | ||
>&2 printf "\nYou may be able to find out more about this error by running 'mutagen sync list'\n\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be a way to grab this last error, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at capturing the error line and grepping over it, thanks.
Forgot to leave testing steps originally. Can be tested by creating a symlink in the sync'd directory with a target outside the sync'd directory and calling warden sync start. It should exit and output the last mutagen error encountered, instead of waiting indefinitely. |
@Lunaetic Thank you very much for this valuable contribution. Ran a couple tests and it LG2M
|
Check the output of 'mutagen sync list' for errors, and exit sync command if found, instead of indefinitely waiting.