[misc] don't enable the commandline hogger on POSIX shells

* Assume that the presence of a "SHELL" environment variable is enough to tell if we have a POSIX shell.
This commit is contained in:
Pete Batard 2025-02-20 13:13:44 +00:00
parent 622e60659c
commit 9540ca359d
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
2 changed files with 8 additions and 7 deletions

View file

@ -3427,8 +3427,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
if ((strchr(tmp, 'p') != NULL) || ((strchr(tmp, 'P') != NULL) && (strchr(tmp, 'P')[1] != 'H')))
ini_flags[0] = 'a';
// Now enable the hogger before processing the rest of the arguments
if (!disable_hogger) {
// Now enable the hogger before processing the rest of the arguments.
// Note that with POSIX shells (e.g. msys) we don't enable the hogger as it is not needed.
if (!disable_hogger && getenv("SHELL") == NULL) {
// Reattach the console, if we were started from commandline
if (AttachConsole(ATTACH_PARENT_PROCESS) != 0) {
uprintf("Enabling console line hogger");

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 4.7.2222"
CAPTION "Rufus 4.7.2223"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -399,8 +399,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,7,2222,0
PRODUCTVERSION 4,7,2222,0
FILEVERSION 4,7,2223,0
PRODUCTVERSION 4,7,2223,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -418,13 +418,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.7.2222"
VALUE "FileVersion", "4.7.2223"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2025 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.7.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.7.2222"
VALUE "ProductVersion", "4.7.2223"
END
END
BLOCK "VarFileInfo"