shithub: mc

Download patch

ref: 4da95e96e01dac40ff290b1e2cb4e9f641aea398
parent: bfc9204963426bf0e8121b416458550b8f2616ad
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Feb 4 18:08:25 EST 2019

Error if we forgot to give code to build.

--- a/mbld/main.myr
+++ b/mbld/main.myr
@@ -67,9 +67,15 @@
 
 	b = mkbuild(tags)
 	if targname.len != 0
+		if cmd.args.len == 0
+			std.fatal("nothing to compile\n")
+		;;
 		bld.opt_objdir = objdir
 		ok = buildimm(b, targname, cmd.args)
 	elif runsrc.len != 0
+		if cmd.args.len == 0
+			std.fatal("nothing to run\n")
+		;;
 		bld.opt_objdir = objdir
 		bld.opt_verbosity = -1
 		tmp = std.mktemppath("runmyr")