Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@oranav

Description

@oranav
Issue body actions

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.

samamorgan, amrishparmar, mgillis, jd185367, elilutsky and 3 more

Metadata

Metadata

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.