v.pref: handle `|` as separators in -path option parsing again (as documented in the help)

pull/6142/head
Delyan Angelov 2020-08-15 22:07:38 +03:00
parent c2b4c645a1
commit e7b2aefd36
2 changed files with 2 additions and 3 deletions

View File

@ -168,8 +168,7 @@ pub fn (v Builder) get_builtin_files() []string {
return [] return []
} }
*/ */
// println('get_builtin_files() lookuppath:') v.log('v.pref.lookup_path: $v.pref.lookup_path')
// println(v.pref.lookup_path)
// Lookup for built-in folder in lookup path. // Lookup for built-in folder in lookup path.
// Assumption: `builtin/` folder implies usable implementation of builtin // Assumption: `builtin/` folder implies usable implementation of builtin
for location in v.pref.lookup_path { for location in v.pref.lookup_path {

View File

@ -286,7 +286,7 @@ pub fn parse_args(args []string) (&Preferences, string) {
} }
'-path' { '-path' {
path := cmdline.option(current_args, '-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++ i++
} }
'-custom-prelude' { '-custom-prelude' {