mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix travis windows user home
This commit is contained in:

committed by
Alexander Medvednikov

parent
5baff9beda
commit
d0e7d0070d
@@ -459,7 +459,14 @@ pub fn home_dir() string {
|
||||
mut home := os.getenv('HOME')
|
||||
$if windows {
|
||||
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 += '/'
|
||||
return home
|
||||
|
Reference in New Issue
Block a user