From b990f04064708fb9e16b1fc284c46a3a56bb7abd Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 24 Jun 2019 00:54:23 +0200 Subject: [PATCH] main.v: error if vlib is missing + instruction to clone the repo --- compiler/main.v | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/main.v b/compiler/main.v index 3af33f1d91..6a9f8d4726 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -754,6 +754,11 @@ fn new_v(args[]string) *V { ] // Location of all vlib files TODO allow custom location mut lang_dir = os.home_dir() + '/code/v/' + if !os.dir_exists(lang_dir) { + println('$lang_dir not found. Run:') + println('git clone https://github.com/vlang/v ~/code/v') + exit(1) + } out_name_c := out_name.all_after('/') + '.c' mut files := []string // Add builtin files