terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Profile Shortcut fails to open with .cmd file

Open SamuelDev opened this issue 6 years ago • 1 comments

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable): 0.7.3291.0

Any other software?
.cmd file

Steps to reproduce

  1. Create file named test.cmd
  2. Add some command to the file
  3. Create a terminal profile with the startingDirectory variable pointed to the folder of the cmd file, and the commandLine variable equal to the name of the file (test.cmd)
  4. Attempt to open the profile in terminal

Expected behavior

Expected behavior is to open the cmd file and execute the commands within the file.

Actual behavior

Actual behavior is the terminal flashes like it quickly opened and closed the file. 2 weeks ago it would open the file and keep it open while executing the exact same commands. (the script I am using stays open until it is manually closed).

SamuelDev avatar Dec 03 '19 16:12 SamuelDev

Sorry -- this is now by design. Terminal will no longer execute files from the startingDirectory directly. You can either set commandline: "%COMSPEC% /c test.cmd" or specify a full path to test.cmd.

DHowett-MSFT avatar Dec 03 '19 16:12 DHowett-MSFT