Closed jimmymcpeter closed 9 months ago
@jimmymcpeter thanks, well spotted. We'll open an internal issue to address this. Do you think the batch upload should stop on first error? That could probably be set through an optional parameter.
Do you think the batch upload should stop on first error? That could probably be set through an optional parameter.
I'm using the CLI through a GitHub Action. I really need a non-zero exit code returned otherwise the action returns it was a success.
That much is clear, we'll add non-zero exit code. The question is only, would it be preferred for the command to exit as soon as the first uploaded file fails, or is it OK like this, that we proceed with all the files, and only then return non-zero code?
Sorry I dodged your initial question. It's OK like it this. Maybe you add the abort on error parameter as an enhancement idea for the future? 😃
I added a workaround into my GH action using tee and grep. Hopefully this is helpful for a few others --
logfile="phrase.log"
phrase push --wait --config ${{ inputs.config_file }} | tee -a $logfile
if grep -q "There was an error" $logfile; then
echo "Phrase Strings Push encountered an error"
exit 1
fi
Hi, what would you recommend I do regarding an error during a push of multiple source files? The exit code is always 0 and I don't see any option to exit on error.
Edit: Actually, the error code is 0 even with 1 source file configured.