Flist CLI Updated for Linux, MacOS, Windows #7

Merged
mik-tf merged 16 commits from development_mac_2 into main 2024-10-11 04:50:59 +00:00
Showing only changes of commit 4ea5bf3c7b - Show all commits

View File

@ -5,7 +5,7 @@ import json
import x.json2
const token_file = os.join_path(os.home_dir(), '.config', 'tfhubtoken')
const binary_location = if os.user_os() == 'windows' {
const binary_location = $if windows {
'C:\\Program Files\\flist\\flist.exe'
} else {
'/usr/local/bin/flist'
@ -126,7 +126,7 @@ fn install() {
os.mkdir_all(os.dir(binary_location)) or { panic(err) }
os.cp(current_exe, binary_location) or { panic(err) }
os.chmod(binary_location, 0o755) or { panic(err) }
if os.user_os() == 'windows' {
$if windows {
add_path_windows()
}
success_message('Flist CLI has been installed to ' + binary_location)