(sdks: DartSdks, definition: DartTaskDefinition, cwd: string | undefined)
| 162 | } |
| 163 | |
| 164 | protected async createTaskExecution(sdks: DartSdks, definition: DartTaskDefinition, cwd: string | undefined): Promise<vs.ProcessExecution | undefined> { |
| 165 | if (!definition.command) |
| 166 | return; |
| 167 | |
| 168 | const sdk = definition.command === "flutter" && sdks.flutter ? sdks.flutter : sdks.dart; |
| 169 | const executable = getExecutableName(definition.command); |
| 170 | const program = path.join(sdk, "bin", executable); |
| 171 | let args = definition.args ?? []; |
| 172 | if (definition.runtimeArgs) { |
| 173 | const runtimeArgs = await definition.runtimeArgs(); |
| 174 | if (runtimeArgs) |
| 175 | args = args.concat(runtimeArgs); |
| 176 | } |
| 177 | |
| 178 | return new vs.ProcessExecution( |
| 179 | program, |
| 180 | args || [], |
| 181 | { cwd, env: getToolEnv() }, |
| 182 | ); |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | export class DartTaskProvider extends BaseTaskProvider { |
nothing calls this directly
no test coverage detected