miniscruff/changie

Slashes in FragmentFileFormat result in unexpected file paths

Closed this issue · 0 comments

Thanks for submitting a bug report, please fill in the following details.

Description

If you enter a slash as part of FragmentFileFormat it results in the system trying to create a fragment file in a nested directory, rather than in the "unreleased" directory.

I encountered this because I wanted to use component names likes "sdk/nodejs", "sdk/go" in my config and have the component included in the fragment path.

Reproduction Steps

  1. Edit config to add a component such as "sdk/go".
  2. Then run changie new and pick that component.
  3. See error: open .changes/unreleased/sdk/go-Improvements-123.yaml: no such file or directory

What happened

Error about no such file or directory.

Expected behavior

I expected changie to clean the template to be a safe filename.

Additional context

Working on a PR for a fix for this, and happy to iterate on that with feedback.