Skip to content

Commit 45cef27

Browse files
authored
Update version-checker.js
1 parent 7628790 commit 45cef27

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

util/version-checker.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ import axios from 'axios';
22
import meow from 'meow';
33

44
const checkVersion = async () => {
5-
const res = await axios.default(
6-
'https://api.github.com/repos/SwapnilSoni1999/spotify-dl/tags'
7-
);
5+
try {
6+
const res = await axios.default(
7+
'https://api.github.com/repos/SwapnilSoni1999/spotify-dl/tags'
8+
);
9+
} catch (_e) {
10+
console.log("Could not check current version, have checked too many times skipping");
11+
}
812
const latestVersion = res.data[0].name;
913
const pkg = meow('', { importMeta: import.meta }).pkg;
1014

0 commit comments

Comments
 (0)