Describe the bug
If I automate the creation of the pdm.toml file for authentication in the pre_build hook via a script, it is not considered when calling pdm build for the first time (even though the creation was successful and the file exists). If I call pdm build again, it works fine as pdm.toml already exists. Is this intended?
To reproduce
- In the
pyproject.toml, add:
[tool.pdm.scripts]
pre_build = "scripts/pre_build.py"
- Create
scripts/pre_build.py where the pdm.toml is created
- Execute
pdm build
Expected Behavior
pdm build should also consider pdm.toml files even if they are created on the fly during a pre hook.
Environment Information
PDM version: 2.25.6
Verbose Command Output
No response
Additional Context
No response
Are you willing to submit a PR to fix this bug?