WeiDUorg / weidu

WeiDU is a program used to develop, distribute and install modifications for games based on the Infinity Engine.
http://www.weidu.org
GNU General Public License v2.0
90 stars 20 forks source link

AT_NOW ignores exit status #105

Closed lynxlynxlynx closed 7 years ago

lynxlynxlynx commented 7 years ago

Eg., sticking AT_NOW ~exit 11~ in a tp2 won't make it fail.

Is this intentional?

Background: I'm trying to fix 10pp to work with wonky parent dirs and it offloads most of the work to perl via AT_NOW. So if something goes wrong there, weidu doesn't register it and happily finishes installing a broken mod.

FredrikLindgren commented 7 years ago

Yes, WeiDU explicitly ignores the return value of the inferior process.

I'm not sure I can start making it fail on this without causing problems in the wild. It probably goes without saying that something like perl programs are likely outside the scope of AT_*.

lynxlynxlynx commented 7 years ago

Sure, perl is just my use case (and maybe SSL using mods). Anything you run, you can't detect failures in.

Maybe an extra optional parameter, so there's backward compatibility?

FredrikLindgren commented 7 years ago

Implemented. Sorry about the delay. AT_NOW foo ~exit 11~ will result in the variable %foo% evaluating to 11.