BetaHuhn/repo-file-sync-action

Error when sync an empty file

jerome-morgado opened this issue ยท 6 comments

๐Ÿž Describe the bug

When synchronize a file which is empty I have the following errors :

Synchronize Files
Cannot read property 'startsWith' of undefined

Synchronize Files
TypeError: Cannot read property 'startsWith' of undefined

๐Ÿ“š To Reproduce

Create a file with no content.
I created an empty docker-compose.yaml file

๐Ÿ’ก Expected behavior

I expected to have my file syncronized

๐Ÿ–ผ๏ธ Screenshots

โš™๏ธ Environment

  • Action version: [e.g. v1.0.0]

๐Ÿ“‹ Additional context

Add any other context about the problem here.

I can't reproduce your issue. Syncing an empty file works fine for me.

Could you share more of the logs? What does your sync.yml look like?

Closing this for now because of a lack of response.

Please reopen it if the issue persists @jerome-morgado.

If the file hasn't any content ( maybe one end of line ) we have the issue

Unfortunately, I can't reproduce this issue.

Until you share more info I can't do anything about this.

const lastHeaderLineIndex = lines.findIndex((line) => line.startsWith('+++'))
, here the lines never be empty ? @jerome-morgado.

๐ŸŽ‰ This issue has been resolved in version 1.17.21 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€