fix: support space in file name (#446)

* support space in file name

* Update github.ts
This commit is contained in:
MystiPanda 2024-05-06 21:35:11 +08:00 committed by GitHub
parent 0979303f02
commit 998623f0c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,7 +149,7 @@ export const upload = async (
const [owner, repo] = config.github_repository.split("/"); const [owner, repo] = config.github_repository.split("/");
const { name, size, mime, data: body } = asset(path); const { name, size, mime, data: body } = asset(path);
const currentAsset = currentAssets.find( const currentAsset = currentAssets.find(
({ name: currentName }) => currentName == name ({ name: currentName }) => currentName == name.replace(' ','.')
); );
if (currentAsset) { if (currentAsset) {
console.log(`♻️ Deleting previously uploaded asset ${name}...`); console.log(`♻️ Deleting previously uploaded asset ${name}...`);