Skip to content

Terminal preview does not accept environment variables from parent process #15496

Closed
@ChrisKnue-MSFT

Description

@ChrisKnue-MSFT

Windows Terminal version

1.18.1421.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

Create a batch file "test.bat" with contents

echo %TEST%
pause

open cmd terminal profile
run SET TEST=wow
run wt test.bat
run ./test.bat

Expected Behavior

New terminal window should open up with output (this is the behavior in 1.16)

>echo wow
wow
>pause
press any key to continue . . .

Then outputs in parent window

>echo wow
wow
>pause
press any key to continue . . .

Actual Behavior

New terminal window is opened with output

>echo
ECHO is on.
>pause
Press any key to continue . . .

Then outputs in parent window

>echo wow
wow
>pause
press any key to continue . . .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Commandlinewt.exe's commandline argumentsIssue-BugIt either shouldn't be doing this or needs an investigation.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions