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

Relative paths works differently with newer versions #1411

Copy link
Copy link
Open
@kesmik

Description

@kesmik
Issue body actions

Description

Hello,
I am using commitizen with my sphinx documentation to include CHANGELOG to my sphinx docs.
After update to 4.6.3 and newer versions the following code breaks:
subprocess.run("cz -n cz_customize changelog --file-name=" + os.path.join("changelog", file), shell=True)
but rather following works:
subprocess.run("cz -n cz_customize changelog --file-name=" + os.path.join("docs", "source", "changelog", file), shell=True)

It seems that there are the changes related to relative path detection or so.
Is this a bug or expected behavior?
Can someone help to understand how code should be changed in order to support both cz versions?

Steps to reproduce

  1. create git repo
  2. create a subfolder
  3. change directory to subfolder
  4. run cz changelog generation and it will grab git root directory instead

Current behavior

Fails to generate changelog in intended path

Desired behavior

Generate documents as in previous versions or at least make it compatible

Screenshots

No response

Environment

Commitizen Version: 4.6.3
Python Version: 3.12.8 (main, Dec 4 2024, 08:54:12) [GCC 11.4.0]
Operating System: Linux

Metadata

Metadata

Assignees

No one assigned

    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.