[metapost] Command "show" on a non-empty "path" makes mpost(1) return with error code 1

Wojciech A. Koszek wkoszek at FreeBSD.org
Wed Dec 3 10:16:58 CET 2014


Hello,

This is what I expected: ``show'' called with any valid argument should be
fine to put and shouldn't be modifying mpost(1) exit behavior. In
particular: return code should always be 0.

What I see: ``show'', when placed in a figure's script, is changing a
return code of the ``mpost'', if the thing I try to show is a path, and it's
not empty. This destroys my Makefile-based flow.


Snippet:

	wget -O sample.mp http://pastebin.com/YNkg4E05

---sample.mp---
beginfig(4);
	path	circle;
	%circle = (0,0);
	%circle = fullcircle;
	show circle;
endfig;
end
---

If you call as is:

	$ mpost sample.mp > /dev/null
	$ echo $?
	0

If you uncomment line 3:

	$ mpost sample.mp > /dev/null
	$ echo $?
	1

I think it's a bug.

-- 
Wojciech A. Koszek
wkoszek at FreeBSD.czest.pl
http://www.koszek.com/


More information about the metapost mailing list