Description:
When collecting Poetry projects for caching, a **/poetry.lock glob is used, meaning the action supports Poetry projects in subfolders.
|
protected patterns: string = '**/poetry.lock' |
However, in order to process the Poetry configuration, getPoetryConfiguration runs the poetry command from the repo's root directory; this causes Poetry to return an invalid configuration when there is a Poetry project inside an inner directory.
|
const {stdout, stderr, exitCode} = await exec.getExecOutput('poetry', [ |
|
'config', |
|
'--list' |
|
]); |
Action version:
v4
Platform:
Runner type:
Tools version:
All Poetry versions
Repro steps:
Create a repository with a Poetry project inside a subfolder; use the default action configuration. Matter of fact, even if a specific cache-dependency-path is provided, the resulting Poetry config will still be invalid.
Expected behavior:
The correct pyproject.toml and poetry.toml (inside the subfolder) are used.
Actual behavior:
The read configuration uses pyproject.toml and poetry.toml from the repository root directory.
Description:
When collecting Poetry projects for caching, a
**/poetry.lockglob is used, meaning the action supports Poetry projects in subfolders.setup-python/src/cache-distributions/poetry-cache.ts
Line 11 in ffcd000
However, in order to process the Poetry configuration,
getPoetryConfigurationruns thepoetrycommand from the repo's root directory; this causes Poetry to return an invalid configuration when there is a Poetry project inside an inner directory.setup-python/src/cache-distributions/poetry-cache.ts
Lines 45 to 48 in ffcd000
Action version:
v4
Platform:
Runner type:
Tools version:
All Poetry versions
Repro steps:
Create a repository with a Poetry project inside a subfolder; use the default action configuration. Matter of fact, even if a specific
cache-dependency-pathis provided, the resulting Poetry config will still be invalid.Expected behavior:
The correct pyproject.toml and poetry.toml (inside the subfolder) are used.
Actual behavior:
The read configuration uses pyproject.toml and poetry.toml from the repository root directory.