Non-Zero Exit Codes on --action test

All your suggestions, requests and ideas for future development
Post Reply
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Non-Zero Exit Codes on --action test

Post by laharah »

cmd to replicate:

Code: Select all

> filebot -rename --action test The\ Wolf\ Of\ Snow\ Hollow.2020.1080p.WEB-DL.H264.AC3-/ --db TheMovieDB
Rename movies using [TheMovieDB]
Auto-detect movie from context [/pool/Media/Torrents/The Wolf Of Snow Hollow.2020.1080p.WEB-DL.H264.AC3-/The Wolf Of Snow Hollow.2020.1080p.WEB-DL.H264.AC3-EVO.mkv]
[TEST] from [/pool/Media/Torrents/The Wolf Of Snow Hollow.2020.1080p.WEB-DL.H264.AC3-/The Wolf Of Snow Hollow.2020.1080p.WEB-DL.H264.AC3-EVO.mkv] to [/pool/Media/Torrents/The Wolf Of Snow Hollow.2020.1080p.WEB-DL.H264.AC3-/The Wolf of Snow Hollow (2020).mkv]
Processed 1 file

>echo $?
1
The output hasn't changed from 4.9.1 to 4.9.2, however the exit code is now 1 instead of 0. I use the exit code to catch errors before parsing the output on dry-runs for the deluge plugin. I can change the plugin if this is a deliberate change to expected exit codes, but I wanted to make sure it wasn't just a bug.
User avatar
rednoah
The Source
Posts: 24015
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Non-Zero Exit Codes on --action test

Post by rednoah »

It'll return 0 success if 1 or more files have been processed successfully. I guess what changed at some point is that --action TEST operations no longer count, which was a problem for some reason I no longer remember, probably related to history and post-processing features needing to be auto-disabled in test mode.
:idea: Please read the FAQ and How to Request Help.
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Re: Non-Zero Exit Codes on --action test

Post by laharah »

no problem, I'll put in a check to ignore exit codes on test runs.
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Re: Non-Zero Exit Codes on --action test

Post by laharah »

Moving forward, is there any sure fire way to tell the difference between a test-run that passes and one that errors out? I know java will sometimes output un-imporant errors into stderr, so I can't use that to check for failure.
User avatar
rednoah
The Source
Posts: 24015
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Non-Zero Exit Codes on --action test

Post by rednoah »

Checking for Processed 0 files should do the trick. If it's 1 or more, then it's at least a partial success. If you process many files, then it's possible for some files to work and some files to fail.
:idea: Please read the FAQ and How to Request Help.
laharah
Power User
Posts: 13
Joined: 22 Oct 2014, 10:06

Re: Non-Zero Exit Codes on --action test

Post by laharah »

Thanks, managed to push out an update for it.
Post Reply