Ticket #69: csc-exit.diff.txt

File csc-exit.diff.txt, 804 bytes (added by Jim Ursetto, 16 years ago)

shell command non-zero exit status will cause csc to (exit 1)

Line 
1Index: csc.scm
2===================================================================
3--- csc.scm (revision 15417)
4+++ csc.scm (working copy)
5@@ -919,13 +919,12 @@
6 (let ((str (if windows-shell
7 (string-append "\"" str "\"")
8 str)))
9- (set! last-exit-code
10- (if dry-run
11- 0
12- (system str)))
13- (unless (zero? last-exit-code)
14- (printf "\nError: shell command terminated with non-zero exit status ~S: ~A~%" last-exit-code str) )
15- last-exit-code))
16+ (let ((raw-exit-code (if dry-run 0 (system str))))
17+ (unless (zero? raw-exit-code)
18+ (printf "\nError: shell command terminated with non-zero exit status ~S: ~A~%" raw-exit-code str))
19+ (set! last-exit-code
20+ (if (zero? raw-exit-code) 0 1))
21+ last-exit-code)))
22
23 (define ($delete-file str)
24 (when verbose