소스 검색

make sure to remove .map file if we are not compiling with -debug

Nicolas Cannasse 13 년 전
부모
커밋
6186f15eda
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -1195,7 +1195,7 @@ let generate com =
 		print ctx "})()";
 		newline ctx;
 	end;
-	if com.debug then write_mappings ctx;
+	if com.debug then write_mappings ctx else try Sys.remove (com.file ^ ".map") with _ -> ();
 	let ch = open_out_bin com.file in
 	output_string ch (Buffer.contents ctx.buf);
 	close_out ch);