-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
fix: support space in file name #446
Conversation
@@ -149,7 +149,7 @@ export const upload = async ( | |||
const [owner, repo] = config.github_repository.split("/"); | |||
const { name, size, mime, data: body } = asset(path); | |||
const currentAsset = currentAssets.find( | |||
({ name: currentName }) => currentName == name | |||
({ name: currentName }) => currentName == name.replace(' ','.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to the notes listed here we may want to expand this to include other characters but I'm okay with this as is for now.
The GitHub docs don't provide a non ambiguous list of characters that it transforms to periods. The best I could do is manually upload release asses with files that contain a wide variety of characters to learn from example
thanks for looking into this @MystiPanda. nice catch |
Yes, I noticed what the documentation said, I initially wanted to use a regex to match all the special characters the documentation said, but I didn't find this character list in the documentation, so I just replace space which is most common. |
I think I've got something here. It seems that all characters except letters, numbers and |
thanks. we can expand this list as we go. just a heads up, your changes have been incorporated into the v2 which now includes these changes |
According to this issue comment, GitHub will rename the asset, which causes the name-based check to fail for file names containing spaces. We can change the file name to the same as GitHub before checking to solve this problem.