You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unaware of standardized method to determine if SubtitleEdit CLI was successful. Right now, I'm regex-ing through it's console output to determine how many files were converted(I only do one file at a time, not entire folders; so "0 file(s) converted" means error and "1 file(s) converted" means success).
In the case of calling an external program, if any information output is passed to stderr then PowerShell will set $? to $false.
What I'm doing works, but it's dependant on SE's console output, which you may choose to alter at some point. Whereas outputting to stderr would be robust.
Thank you!
The text was updated successfully, but these errors were encountered:
I am unaware of standardized method to determine if SubtitleEdit CLI was successful. Right now, I'm regex-ing through it's console output to determine how many files were converted(I only do one file at a time, not entire folders; so "
0
file(s) converted" means error and "1
file(s) converted" means success).Seeing as SE is not a really a CLI, as you've mentioned here, I presume that it can't emit a proper exit code, but, it should be able to output to stderr, which would prompt Powershell to populate it's
$?
automatic variable:What I'm doing works, but it's dependant on SE's console output, which you may choose to alter at some point. Whereas outputting to stderr would be robust.
Thank you!
The text was updated successfully, but these errors were encountered: