Przeglądaj źródła

unquote commands

Nicolas Cannasse 14 lat temu
rodzic
commit
d8d706862a
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      main.ml

+ 2 - 0
main.ml

@@ -394,6 +394,8 @@ try
 		),"<file>[@name] : add a named resource file");
 		("-prompt", Arg.Unit (fun() -> prompt := true),": prompt on error");
 		("-cmd", Arg.String (fun cmd ->
+			let len = String.length cmd in
+			let cmd = (if len > 0 && cmd.[0] = '"' && cmd.[len - 1] = '"' then String.sub cmd 1 (len - 2) else cmd) in
 			cmds := expand_env cmd :: !cmds
 		),": run the specified command after successful compilation");
 		("--flash-strict", define "flash_strict", ": more type strict flash API");