From 983f353a5e1cab7d0c49a4924772457f9b796968 Mon Sep 17 00:00:00 2001 From: Mahmoud-Emad Date: Wed, 25 Dec 2024 09:54:51 +0000 Subject: [PATCH] fix: Update the vtest alias --- install_herolib.vsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install_herolib.vsh b/install_herolib.vsh index 679c427c..3b87602f 100755 --- a/install_herolib.vsh +++ b/install_herolib.vsh @@ -30,10 +30,11 @@ fn addtoscript(tofind string, toadd string) ! { } if line.trim_space() == ""{ prev_is_emtpy = true - } + } + if !line.contains(tofind) { new_lines << line - } + } } new_lines << toadd new_lines << "" @@ -63,7 +64,7 @@ os.symlink('${abs_dir_of_script}/lib', '${os.home_dir()}/.vmodules/freeflowunive println('Herolib installation completed successfully!') // Add vtest alias -addtoscript('vtest ', 'alias vtest \'v -stats -enable-globals -n -w -gc none -no-retry-compilation -cc tcc test\' %') or { +addtoscript('alias vtest=', 'alias vtest=\'v -stats -enable-globals -n -w -gc none -no-retry-compilation -cc tcc test\' %') or { eprintln('Failed to add vtest alias: ${err}') }