diff --git a/cli/hero.v b/cli/hero.v index d9364271..29b09d9c 100644 --- a/cli/hero.v +++ b/cli/hero.v @@ -19,25 +19,24 @@ fn playcmds_do(path string) ! { } fn do() ! { - - if ! core.is_osx()! { + if !core.is_osx()! { if os.getenv('SUDO_COMMAND') != '' || os.getenv('SUDO_USER') != '' { println('Error: Please do not run this program with sudo!') - exit(1) // Exit with error code + exit(1) // Exit with error code } } - if os.getuid() == 0 { - if core.is_osx()! { - eprintln("please do not run hero as root in osx.") + if os.getuid() == 0 { + if core.is_osx()! { + eprintln('please do not run hero as root in osx.') exit(1) } - } else { - if ! core.is_osx()! { + } else { + if !core.is_osx()! { eprintln("please do run hero as root, don't use sudo.") exit(1) } - } + } if os.args.len == 2 { mypath := os.args[1] @@ -51,7 +50,7 @@ fn do() ! { mut cmd := Command{ name: 'hero' description: 'Your HERO toolset.' - version: '1.0.25' + version: '1.0.26' } // herocmds.cmd_run_add_flags(mut cmd) @@ -115,4 +114,4 @@ fn main() { fn pre_func(cmd Command) ! { herocmds.plbook_run(cmd)! -} \ No newline at end of file +} diff --git a/install_hero.sh b/install_hero.sh index cecaa340..0e6bff9c 100755 --- a/install_hero.sh +++ b/install_hero.sh @@ -4,7 +4,7 @@ set -e os_name="$(uname -s)" arch_name="$(uname -m)" -version='1.0.25' +version='1.0.26' # Base URL for GitHub releases