| 604 | } |
| 605 | |
| 606 | async function exec(cmd: string, args: string[], workspaceFolder: string, injectedEnv: { [name: string]: string | boolean } = {}) { |
| 607 | const injectedEnvArray = Object.keys(injectedEnv).length > 0 |
| 608 | ? Object.entries(injectedEnv).map(([key, value]) => `${getSafeId(key)}=${value}`) |
| 609 | : undefined; |
| 610 | |
| 611 | const execArgs = { |
| 612 | ...staticExecParams, |
| 613 | 'remote-env': injectedEnvArray as any, |
| 614 | 'workspace-folder': workspaceFolder, |
| 615 | 'skip-feature-auto-mapping': false, |
| 616 | cmd, |
| 617 | args, |
| 618 | _: [ |
| 619 | cmd, |
| 620 | ...args |
| 621 | ] |
| 622 | }; |
| 623 | const result = await doExec(execArgs); |
| 624 | return (!result.code && !result.signal); |
| 625 | } |
| 626 | |
| 627 | async function generateDockerParams(workspaceFolder: string, args: FeaturesTestCommandInput): Promise<DockerResolverParameters> { |
| 628 | const { logLevel, quiet, disposables } = args; |