git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Incorrect $HOME value when using runas on Windows
@ 2021-01-20 10:12 Mail
  2021-01-22  1:33 ` brian m. carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Mail @ 2021-01-20 10:12 UTC (permalink / raw)
  To: git

To reproduce the issue:
1. Install git-windows x32 or x64 for all users.
2. Install Total Commader or any other file manager that support system 
context menu
3. Add user in Windows via msc or settings app and set password. Don't 
forget to disable "User must change password on first login" in case 
user created via msc
4. In current user session execute runas.exe /user:NewlyCreatedUser 
"Path To File Manager"
5. Right click on empty space in file list and choose Git bash here
6. Type `echo $HOME` in bash console and press enter
7. The $HOME is `/c/Windows/System32`. Expected `/c/Users/NewlyCreatedUser`
It seems git for windows uses HOMEPATH that points to system32 in case 
of runas command. Might be using USERPROFILE variable is better.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-22 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 10:12 Incorrect $HOME value when using runas on Windows Mail
2021-01-22  1:33 ` brian m. carlson
2021-01-22 13:54   ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).