-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with location of CHANGELOG.md #1123
Comments
Migrated @dornech's comment from other issue: So, I had some trouble debugging the issue but I think I found the root cause. Basically it has to do with an issue that occurs occasionally: shared file handling in Windows. to explain: I use a virtual machine for my programs but have data including Python repositories on shared drives. This leads to different file representations for the same file/directories. The problem is in # Prevent path traversal attacks
if raw.repo_dir not in changelog_file.parents:
raise InvalidConfiguration(
"Changelog file destination must be inside of the repository directory."
) My anonymized values are: This means while repo_dir uses the drive letter, the evaluation of the changelog_file parents use the share descriptor. |
@dornech, if you make the following change, does it work? diff a/src/semantic_release/cli/config.py b/src/semantic_release/cli/config.py
370
logging.warning(
"Found .git/ in higher parent directory rather than provided in configuration."
)
- return found_path
+ return found_path.resolve()
@field_validator("commit_parser", mode="after")
@classmethod |
Thanks for shifting the comment and sorry for the mess ... I think the hint with .resolve() is the solution. |
@dornech, thanks for the reply. Hopefully it is. I will add a better test and see if it works or fails in the CI windows job. Is there anything unusual about your Windows machine setup? Like is it a roaming profile with a network mounted home folder? |
Well, I do not think my Windows setup is toooo unusual but probably a little bit different. Years ago I had the idea to easen backup issues of my system f. e. for change of hardware by using virtualbox on a more or less plain host but an "operative" Windows installation in a VirtualBox VM. However, data files reside on the host as "normal" drives and are mapped into the VM. I learned this has some draw-backs and these drives behave a little bit different especially when it comes to access files via Windwos drive letters or via UNC-paths. |
@dornech, makes sense from that perspective. I didn't expect why a |
🎉 This issue has been resolved in version 9.15.2 🎉The release is available on: |
Bug Report
Description
I use python-semantic-release with a generated config via pyproject.toml.
In a test package directory I execute
semantic-release -vv --noop version --print
Expected behavior
Output of a successful noop run.
Actual behavior
As you can see, there is a problem with the location of the changelog file I am not able to fix.
Environment
Configuration
The text was updated successfully, but these errors were encountered: