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

Error when sync an empty file #128

Closed
jerome-morgado opened this issue Oct 22, 2021 · 6 comments · Fixed by #242
Closed

Error when sync an empty file #128

jerome-morgado opened this issue Oct 22, 2021 · 6 comments · Fixed by #242
Labels
bug Something isn't working released waiting for response Waiting for a response from the author

Comments

@jerome-morgado
Copy link

🐞 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.

@jerome-morgado jerome-morgado added the bug Something isn't working label Oct 22, 2021
@BetaHuhn
Copy link
Owner

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?

@BetaHuhn BetaHuhn added the waiting for response Waiting for a response from the author label Oct 27, 2021
@BetaHuhn
Copy link
Owner

BetaHuhn commented Nov 3, 2021

Closing this for now because of a lack of response.

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

@BetaHuhn BetaHuhn closed this as completed Nov 3, 2021
@Larzack
Copy link

Larzack commented Nov 3, 2021

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

@BetaHuhn
Copy link
Owner

BetaHuhn commented Nov 3, 2021

Unfortunately, I can't reproduce this issue.

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

@whybeyoung
Copy link

whybeyoung commented Aug 17, 2022

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

exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 22, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 22, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 23, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 23, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 23, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 23, 2022
exAspArk added a commit to exAspArk/repo-file-sync-action that referenced this issue Aug 23, 2022
@BetaHuhnBot
Copy link
Collaborator

🎉 This issue has been resolved in version 1.17.21 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released waiting for response Waiting for a response from the author
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants