This project is read-only.


Helper script seeing diff exit code as error


So it looks like snapraid changed some things for their most recent release. If changes are detected during a 'diff' it outputs an exit code of 1. It looks like the helper script is detecting that as an actual error and quitting.

Can anyone assist?
Closed May 16, 2015 at 11:38 AM by therealjmc


mattress wrote May 11, 2015 at 8:05 PM

To temporarily fix it, I changed line 507 to this:
if ($LastExitCode -gt "1") {
However, I've no real idea if that will interfere with anything else where an exit code of 1 really is an error.

therealjmc wrote May 12, 2015 at 6:04 AM

Andrea stated that he will change the behaviour in the 8.1 release. It's hard to say if 1 is only generated when there is a change or if there is an error - that's why it will be 2 in the next release (afair) and I'll change the script then if the exitcode is different from 0 - and if it's different from zero only throw an error if it's different from 2.

The working way is indeed changing line 507 - but I can't say if a "normal" snapraid diff error isn't throwing 1, too.

therealjmc wrote May 16, 2015 at 11:37 AM

Fixed in the new version. Snapraid 8.1 was published yesterday that included a new exitcode.

wrote May 16, 2015 at 11:38 AM