mirror of
https://github.com/vlang/v.git
synced 2025-09-11 16:36:20 -04:00
vpm: show the final path where a module is installed, improve color contrast for white on black terminal sessions
This commit is contained in:
parent
992334390c
commit
bb320f19c8
@ -251,13 +251,13 @@ fn vpm_error(msg string, opts ErrorOptions) {
|
||||
}
|
||||
eprintln(term.ecolorize(term.red, 'error: ') + msg)
|
||||
if opts.details.len > 0 && settings.is_verbose {
|
||||
eprint(term.ecolorize(term.blue, 'details: '))
|
||||
eprint(term.ecolorize(term.cyan, 'details: '))
|
||||
padding := ' '.repeat('details: '.len)
|
||||
for i, line in opts.details.split_into_lines() {
|
||||
if i > 0 {
|
||||
eprint(padding)
|
||||
}
|
||||
eprintln(term.ecolorize(term.blue, line))
|
||||
eprintln(term.ecolorize(term.cyan, line))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -265,13 +265,13 @@ fn vpm_error(msg string, opts ErrorOptions) {
|
||||
fn vpm_warn(msg string, opts ErrorOptions) {
|
||||
eprintln(term.ecolorize(term.yellow, 'warning: ') + msg)
|
||||
if opts.details.len > 0 {
|
||||
eprint(term.ecolorize(term.blue, 'details: '))
|
||||
eprint(term.ecolorize(term.cyan, 'details: '))
|
||||
padding := ' '.repeat('details: '.len)
|
||||
for i, line in opts.details.split_into_lines() {
|
||||
if i > 0 {
|
||||
eprint(padding)
|
||||
}
|
||||
eprintln(term.ecolorize(term.blue, line))
|
||||
eprintln(term.ecolorize(term.cyan, line))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ fn install_modules(modules []Module) {
|
||||
errors++
|
||||
}
|
||||
}
|
||||
println('Installed `${m.name}`.')
|
||||
println('Installed `${m.name}` in ${m.install_path_fmted} .')
|
||||
}
|
||||
if errors > 0 {
|
||||
exit(1)
|
||||
|
@ -162,7 +162,7 @@ fn (mut p Parser) parse_module(m string) {
|
||||
if resp := http.head('${info.url}/issues/new') {
|
||||
if resp.status_code == 200 {
|
||||
issue_tmpl_url := '${info.url}/issues/new?title=Missing%20Manifest&body=${info.name}%20is%20missing%20a%20manifest,%20please%20consider%20adding%20a%20v.mod%20file%20with%20the%20modules%20metadata.'
|
||||
details = 'Help to ensure future-compatibility by adding a `v.mod` file or opening an issue at:\n`${issue_tmpl_url}`'
|
||||
details = 'Please help us ensure future-compatibility, by adding a `v.mod` file or opening an issue at:\n`${issue_tmpl_url}`'
|
||||
}
|
||||
}
|
||||
vpm_warn('`${info.name}` is missing a manifest file.', details: details)
|
||||
|
@ -95,7 +95,7 @@ fn vpm_remove(query []string) {
|
||||
}
|
||||
for m in query {
|
||||
final_module_path := get_path_of_existing_module(m) or { continue }
|
||||
println('Removing module "${m}" ...')
|
||||
println('Removing module "${m}" from ${fmt_mod_path(final_module_path)} ...')
|
||||
vpm_log(@FILE_LINE, @FN, 'removing: ${final_module_path}')
|
||||
rmdir_all(final_module_path) or { vpm_error(err.msg(), verbose: true) }
|
||||
// Delete author directory if it is empty.
|
||||
|
Loading…
x
Reference in New Issue
Block a user