Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wrong Poetry config is used when project is not in repository's root #446

Closed
@oranav

Description

@oranav

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:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

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.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions