Flist CLI Updated for Linux, MacOS, Windows #7
4
flist.v
4
flist.v
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user