From e7b2aefd36a6941d7598513c55b68b65b8f3ff23 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 15 Aug 2020 22:07:38 +0300 Subject: [PATCH] v.pref: handle `|` as separators in -path option parsing again (as documented in the help) --- vlib/v/builder/compile.v | 3 +-- vlib/v/pref/pref.v | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index 92c1ca996d..f16404779d 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -168,8 +168,7 @@ pub fn (v Builder) get_builtin_files() []string { return [] } */ - // println('get_builtin_files() lookuppath:') - // println(v.pref.lookup_path) + v.log('v.pref.lookup_path: $v.pref.lookup_path') // Lookup for built-in folder in lookup path. // Assumption: `builtin/` folder implies usable implementation of builtin for location in v.pref.lookup_path { diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index 90e7fc247f..67323e482f 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -286,7 +286,7 @@ pub fn parse_args(args []string) (&Preferences, string) { } '-path' { path := cmdline.option(current_args, '-path', '') - res.lookup_path = path.split(os.path_delimiter) + res.lookup_path = path.replace('|', os.path_delimiter).split(os.path_delimiter) i++ } '-custom-prelude' {