From 60add6cc2872e238a5915f617c75092fb495fcc1 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 7 Oct 2021 19:22:08 +0300 Subject: [PATCH] ci: fix failing tests --- vlib/v/pref/pref.v | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index 85919bd945..305ef1a5fb 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -633,10 +633,9 @@ pub fn parse_args(known_external_commands []string, args []string) (&Preferences if res.is_debug { res.parse_define('debug') } - if command == 'run' && res.is_prod { - println("error: `v run` with -prod is disabled -building an optimized binary takes much longer, so it shouldn't be used with `v run` -use `v run` without optimization, or build an optimized binary with -prod and then run it separately\n") + if command == 'run' && res.is_prod && os.is_atty(1) > 0 { + eprintln("NB: building an optimized binary takes much longer. It shouldn't be used with `v run`.") + eprintln('Use `v run` without optimization, or build an optimized binary with -prod first, then run it separately.') } // res.use_cache = true