fix travis windows user home
parent
5baff9beda
commit
d0e7d0070d
|
@ -33,6 +33,7 @@ mut:
|
||||||
}
|
}
|
||||||
|
|
||||||
fn new_cgen(out_name_c string) *CGen {
|
fn new_cgen(out_name_c string) *CGen {
|
||||||
|
//println('TmpPath: "$TmpPath"')
|
||||||
path:='$TmpPath/$out_name_c'
|
path:='$TmpPath/$out_name_c'
|
||||||
out := os.create(path) or {
|
out := os.create(path) or {
|
||||||
println('failed to create $path')
|
println('failed to create $path')
|
||||||
|
|
|
@ -459,7 +459,14 @@ pub fn home_dir() string {
|
||||||
mut home := os.getenv('HOME')
|
mut home := os.getenv('HOME')
|
||||||
$if windows {
|
$if windows {
|
||||||
home = os.getenv('HOMEDRIVE')
|
home = os.getenv('HOMEDRIVE')
|
||||||
home += os.getenv('HOMEPATH')
|
if home.len == 0 {
|
||||||
|
home = os.getenv('SYSTEMDRIVE')
|
||||||
|
}
|
||||||
|
mut homepath := os.getenv('HOMEPATH')
|
||||||
|
if homepath.len == 0 {
|
||||||
|
homepath = '\\Users\\' + os.getenv('USERNAME')
|
||||||
|
}
|
||||||
|
home += homepath
|
||||||
}
|
}
|
||||||
home += '/'
|
home += '/'
|
||||||
return home
|
return home
|
||||||
|
|
Loading…
Reference in New Issue