Add coverage driver version in logs

This commit is contained in:
Shivam Mathur
2022-06-30 17:36:40 +05:30
parent 3fda17f3fa
commit 050cb8061b
5 changed files with 64 additions and 6 deletions

View File

@ -413,3 +413,26 @@ export async function parseExtensionSource(
prefix
);
}
/**
* Log to console
*
* @param variable
* @param command
* @param os
*/
export async function setVariable(
variable: string,
command: string,
os: string
): Promise<string> {
switch (os) {
case 'win32':
return '\n$' + variable + ' = ' + command + '\n';
case 'linux':
case 'darwin':
default:
return '\n' + variable + '="$(' + command + ')"\n';
}
}