Skip to content

Commit

Permalink
Merge pull request #88 from ledoge/terminal-fix
Browse files Browse the repository at this point in the history
Don't inherit current directory when using wt/flute
  • Loading branch information
yuk7 committed Jan 26, 2021
2 parents 6e191a1 + ed672b6 commit b1d5dce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int main()

wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L" \"");
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), efpath);
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L"\" run");
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L"\"");

FreeConsole();
STARTUPINFOW si = {0};
Expand All @@ -187,7 +187,7 @@ int main()

wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L" run \"");
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), efpath);
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L" run\"");
wcscat_s(Ecmd, ARRAY_LENGTH(Ecmd), L"\"");

FreeConsole();
STARTUPINFOW si = {0};
Expand Down
3 changes: 2 additions & 1 deletion parenttl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ bool isParentCmdLine()
if ((strcmp(pe32.szExeFile, "cmd.exe") == 0) ||
(strcmp(pe32.szExeFile, "powershell.exe") == 0) ||
(strcmp(pe32.szExeFile, "wsl.exe") == 0) ||
(strcmp(pe32.szExeFile, "wt.exe") == 0) )
(strcmp(pe32.szExeFile, "WindowsTerminal.exe") == 0) ||
(strcmp(pe32.szExeFile, "winpty-agent.exe") == 0) )
{
if(procsCnt < PROC_LIST_SIZE)
{
Expand Down

0 comments on commit b1d5dce

Please sign in to comment.