Evil: fix warning
Use the USERPROFILE environment variable instead of deprecated evil_homedir_get function. Also set the shell to cmd.exe if the SHELL var is not found
This commit is contained in:
parent
0d1c1d5ad6
commit
0a44c3f78b
|
@ -57,10 +57,10 @@ getpwnam(const char *n)
|
|||
pw.pw_name = user_name;
|
||||
snprintf(user_gecos, sizeof(user_gecos), "%s,,,", user_name);
|
||||
pw.pw_gecos = user_gecos;
|
||||
pw.pw_dir = (char *)evil_homedir_get();
|
||||
pw.pw_dir = getenv("USERPROFILE");
|
||||
pw.pw_shell = getenv("SHELL");
|
||||
if (!pw.pw_shell)
|
||||
pw.pw_shell = "sh";
|
||||
pw.pw_shell = "cmd.exe";
|
||||
|
||||
return &pw;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue