microsoft/Terminal

Passing a commandline to an elevate:true profile on the commandline doesn't separate args

Open

#12 597 ouverte le 28 févr. 2022

Voir sur GitHub
 (1 commentaire) (1 réaction) (0 assignés)C++ (3 212 forks)batch import
Area-CommandlineHelp WantedIssue-BugPriority-2Product-Terminal

Métriques du dépôt

Stars
 (35 764 stars)
Métriques de merge PR
 (Merge moyen 27j 19h) (24 PRs mergées en 30 j)

Description

(from a teams convo)

I bet that

wt --profile "Admin Cmd" -- cmd.exe /c D:\os\src\tools\razzle.cmd amd64fre developer_dir D:\Repos\developer\groups\jevansa no_opt

would work

[error 2147942402 (0x80070002) when launching `"cmd.exe /c D:\os\src\tools\razzle.cmd amd64fre developer_dir D:\Repos\developer\groups\jevansa no_opt"'] I ran: wt --profile "Admin Cmd" -- cmd.exe /c D:\os\src\tools\razzle.cmd amd64fre developer_dir D:\Repos\developer\groups\jevansa no_opt

I think it's still trying to take the whole string and pass to CreateProcess. Is there a way to get it split up?

it might be the fact that when you do have an elevate:true profile, we have to CreateProcess another terminal process, and I bet we're passing the whole bit after -- as a single arg to the elevated wt

Guide contributeur