git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Mail <mail@dragonsoul.com>
Cc: git@vger.kernel.org
Subject: Re: Incorrect $HOME value when using runas on Windows
Date: Fri, 22 Jan 2021 01:33:28 +0000	[thread overview]
Message-ID: <YAoraIvKWWRj4cLJ@camp.crustytoothpaste.net> (raw)
In-Reply-To: <b2b0fd42-14a8-fbb6-8817-4e53efb9e730@dragonsoul.com>

[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]

On 2021-01-20 at 10:12:57, Mail wrote:
> 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.

I'd recommend reporting this to the Git for Windows project[0].  The
setting of $HOME is normally a feature provided automatically by
Unix-like operating systems, and its behavior in the MSYS environment is
controlled by Git for Windows.

[0] https://github.com/git-for-windows/git
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2021-01-22  1:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 10:12 Incorrect $HOME value when using runas on Windows Mail
2021-01-22  1:33 ` brian m. carlson [this message]
2021-01-22 13:54   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YAoraIvKWWRj4cLJ@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=mail@dragonsoul.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).