Add tests

This commit is contained in:
Patrick Arminio
2021-11-24 18:40:05 +00:00
parent 95824fd246
commit 1259541ec8
3 changed files with 447 additions and 10 deletions

View File

@ -42,17 +42,20 @@ class PoetryCache extends CacheDistributor {
}
private async getPoetryConfiguration() {
const {stdout, stderr, exitCode} = await exec.getExecOutput(
'poetry config --list'
);
const {stdout, stderr, exitCode} = await exec.getExecOutput('poetry', [
'config',
'--list'
]);
if (exitCode && stderr) {
console.log(stdout, stderr, exitCode);
throw new Error(
`Could not get cache folder path for poetry package manager`
);
}
const lines = stdout.split(os.EOL);
const lines = stdout.trim().split(os.EOL);
const config = {} as {
'cache-dir': string;