(rPath: string, folder: vscode.WorkspaceFolder | vscode.TaskScope, info: RTaskInfo)
| 107 | ]; |
| 108 | |
| 109 | function asRTask(rPath: string, folder: vscode.WorkspaceFolder | vscode.TaskScope, info: RTaskInfo): vscode.Task { |
| 110 | const args = makeRArgs(info.definition.options ?? defaultOptions, info.definition.code); |
| 111 | const rtask: vscode.Task = new vscode.Task( |
| 112 | info.definition, |
| 113 | folder, |
| 114 | info.name ?? 'Unnamed', |
| 115 | info.definition.type, |
| 116 | new vscode.ProcessExecution( |
| 117 | rPath, |
| 118 | args, |
| 119 | { |
| 120 | cwd: info.definition.cwd, |
| 121 | env: info.definition.env |
| 122 | } |
| 123 | ), |
| 124 | info.problemMatchers |
| 125 | ); |
| 126 | |
| 127 | rtask.group = info.group; |
| 128 | return rtask; |
| 129 | } |
| 130 | |
| 131 | export class RTaskProvider implements vscode.TaskProvider { |
| 132 |
no test coverage detected