add fixes

This commit is contained in:
Dmitry Shibanov 2022-06-27 14:00:48 +02:00
parent b313c4cb46
commit cb8feb63f7
4 changed files with 40 additions and 7 deletions

View file

@ -33,15 +33,20 @@ class PoetryCache extends CacheDistributor {
if (pythonLocation) {
core.debug(`pythonLocation is ${pythonLocation}`);
const {exitCode, stderr} = await exec.getExecOutput(
`poetry env use ${pythonLocation}`
const {
exitCode,
stderr
} = await exec.getExecOutput(
`poetry env use ${pythonLocation}`,
undefined,
{ignoreReturnCode: true}
);
if (exitCode) {
throw new Error(stderr);
core.info(`[warning]${stderr}`);
}
} else {
core.warning('python binaries were not found in PATH.');
core.info('[warning]python binaries were not found in PATH.');
}
return paths;