From 6814c975e522fe6d0eec7e0ddafdcf3924c22a03 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 16 Mar 2021 21:02:52 +0200 Subject: [PATCH] vself, vup: update to use err.msg instead of err --- cmd/tools/vself.v | 10 +++++----- cmd/tools/vup.v | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/tools/vself.v b/cmd/tools/vself.v index a21de12c95..102abdc46d 100644 --- a/cmd/tools/vself.v +++ b/cmd/tools/vself.v @@ -27,7 +27,7 @@ fn main() { // The user just wants an independent copy of v, and so we are done. return } - backup_old_version_and_rename_newer() or { panic(err) } + backup_old_version_and_rename_newer() or { panic(err.msg) } println('V built successfully!') } @@ -67,16 +67,16 @@ fn backup_old_version_and_rename_newer() ?bool { bak_file := os.real_path(short_bak_file) list_folder('before:', 'removing $bak_file ...') - os.rm(bak_file) or { errors << 'failed removing $bak_file: $err' } + os.rm(bak_file) or { errors << 'failed removing $bak_file: $err.msg' } list_folder('', 'moving $v_file to $bak_file ...') - os.mv(v_file, bak_file) or { errors << err } + os.mv(v_file, bak_file) or { errors << err.msg } list_folder('', 'removing $v_file ...') - os.rm(v_file) or { } + os.rm(v_file) or {} list_folder('', 'moving $v2_file to $v_file ...') - os.mv_by_cp(v2_file, v_file) or { panic(err) } + os.mv_by_cp(v2_file, v_file) or { panic(err.msg) } list_folder('after:', '') diff --git a/cmd/tools/vup.v b/cmd/tools/vup.v index b7d336413a..7fd6d061de 100644 --- a/cmd/tools/vup.v +++ b/cmd/tools/vup.v @@ -124,9 +124,9 @@ fn (app App) show_current_v_version() { fn (app App) backup(file string) { backup_file := '${file}_old.exe' if os.exists(backup_file) { - os.rm(backup_file) or { eprintln('failed removing $backup_file: $err') } + os.rm(backup_file) or { eprintln('failed removing $backup_file: $err.msg') } } - os.mv(file, backup_file) or { eprintln('failed moving $file: $err') } + os.mv(file, backup_file) or { eprintln('failed moving $file: $err.msg') } } fn (app App) git_command(command string) {