Skip to content
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

Unexpected CHANGES.md file header on Windows #24

Open
manuel-sv opened this issue Jul 17, 2019 · 3 comments
Open

Unexpected CHANGES.md file header on Windows #24

manuel-sv opened this issue Jul 17, 2019 · 3 comments

Comments

@manuel-sv
Copy link

Hi,

I am using studio-changes v1.7.0 and get the following error when I try to update my CHANGES.md on Windows:

Unexpected CHANGES.md file header

There was already an issue on this topic (#1) but the problem still occured in my case. I also tried to replace "\r\n" with "\n" using Notepad++ but get the same error.

Thanks for your help!
Manuel

@mantoni
Copy link
Member

mantoni commented Jul 17, 2019

Can you post the first couple of line from your CHANGES.md file?

@manuel-sv
Copy link
Author

Sure, here they are:

# Changes

## 0.6.0

Line endings are CR+LF.

@mantoni
Copy link
Member

mantoni commented Jul 23, 2019

I tried to reproduce with a test case, but there doesn't seem to be anything wrong with the header you've posted. The piece of code that is checking the header is this:

previous = fs.readFileSync(changes_file, 'utf8');
const match = previous.match(new RegExp(`^${CHANGES_HEADING}(\r?\n){2}`));
if (!match) {
console.error(`Unexpected ${changes_file} file header`);
process.exit(1);
return;
}

Maybe you can add a console.log statement to figure out why the expression isn't matching?

Sorry for not being able to help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants