Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: don't search config files in CWD and $PATH #527

Closed
wants to merge 1 commit into from

Conversation

avih
Copy link
Contributor

@avih avih commented Jun 10, 2024

Config files, like _lesskey, are determined at homefile(...), and on windows, after trying $HOME and $HOMEDRIVE$HOMEPATH, it could fallback to using _searchenv, which first searches CWD and then in $PATH.

Disable this fallback on Windows.

Note that OS2 and DOS variants (DJGPP, Borland, MS-DOS-compiler) still behave like before, and search PWD and $PATH (assuming they still compile - all the non-DJGPP targets use and used _searchenv, which probably only exists on WIndows).

At the very least the DOS variants don't have a notion of $HOME, so it's not obvious where the config files should be searched - if we wanted to address these build targets as well, but for now we don't.

Config files, like _lesskey, are determined at homefile(...), and on
windows, after trying $HOME and $HOMEDRIVE$HOMEPATH, it could fallback
to using _searchenv, which first searches CWD and then in $PATH.

Disable this fallback on Windows.

Note that OS2 and DOS variants (DJGPP, Borland, MS-DOS-compiler)
still behave like before, and search CWD and $PATH (assuming they
still compile - all the non-DJGPP targets use and used _searchenv,
which probably only exists on WIndows).

At the very least the DOS variants don't have a notion of $HOME, so
it's not obvious where the config files should be searched - if we
wanted to address these build targets as well, but for now we don't.
@avih
Copy link
Contributor Author

avih commented Jun 11, 2024

Updated the commit message without changes to the code.

gwsw added a commit that referenced this pull request Jul 22, 2024
…windows, after trying $HOME and $HOMEDRIVE$HOMEPATH, it could fallback to using _searchenv, which first searches CWD and then in $PATH.

Disable this fallback on Windows.

Note that OS2 and DOS variants (DJGPP, Borland, MS-DOS-compiler) still behave like before, and search PWD and $PATH (assuming they still compile - all the non-DJGPP targets use and used _searchenv, which probably only exists on WIndows).

At the very least the DOS variants don't have a notion of $HOME, so it's not obvious where the config files should be searched - if we wanted to address these build targets as well, but for now we don't.

Manual merge of #527.
gwsw added a commit that referenced this pull request Jul 25, 2024
…windows, after trying $HOME and $HOMEDRIVE$HOMEPATH, it could fallback to using _searchenv, which first searches CWD and then in $PATH.

Disable this fallback on Windows.

Note that OS2 and DOS variants (DJGPP, Borland, MS-DOS-compiler) still behave like before, and search PWD and $PATH (assuming they still compile - all the non-DJGPP targets use and used _searchenv, which probably only exists on WIndows).

At the very least the DOS variants don't have a notion of $HOME, so it's not obvious where the config files should be searched - if we wanted to address these build targets as well, but for now we don't.

Manual merge of #527.
@gwsw
Copy link
Owner

gwsw commented Aug 11, 2024

Manually merged into the post659 branch in 3bcd6c2.

@avih
Copy link
Contributor Author

avih commented Aug 11, 2024

Manually merged

Did you see my comment two weeks ago here? 1ca819b#commitcomment-144844485 when you accidentally merged it into master?

Because it again has the same issue that the commit title dissappeared and each paragraph at the commit message became one line.

@gwsw
Copy link
Owner

gwsw commented Aug 11, 2024

Yes I saw that. I did the merge into post659 in 3bcd6c2 on July 24 which was before your comment. Are you suggesting that I amend the commit message?

@avih
Copy link
Contributor Author

avih commented Aug 11, 2024

I did the merge into post659 in 3bcd6c2 on July 24

Oh, I thought you merged it just before you posted the message.

No, don't ammend it. Sorry.

@gwsw gwsw closed this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants