From 5124eae47d5dfff36b9ae39bdbc9256c8467e2fd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 28 Aug 2019 13:06:25 +0300 Subject: [PATCH] msvc: check exit code --- compiler/msvc.v | 5 ++++- vlib/time/time.v | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/msvc.v b/compiler/msvc.v index 19cd4d69ae..096b19d775 100644 --- a/compiler/msvc.v +++ b/compiler/msvc.v @@ -408,10 +408,13 @@ pub fn (v mut V) cc_msvc() { // println('$cmd') - _ := os.exec(cmd) or { + res := os.exec(cmd) or { println(err) panic('msvc error') } + if res.exit_code != 0 { + panic(res.output) + } // println(res) // println('C OUTPUT:') diff --git a/vlib/time/time.v b/vlib/time/time.v index f00a79f8d8..d785c2b357 100644 --- a/vlib/time/time.v +++ b/vlib/time/time.v @@ -11,9 +11,9 @@ const ( ) #include -#include // sleep $if !windows { +#include // sleep #include //#include /// ^^^^ including this makes the windows build fail.