Skip to content

Commit 902d7a2

Browse files
authored
Merge pull request #1469 from Duet3D/hotfix-filechecks
Hotfix - filecheck error
2 parents a034aea + 571331e commit 902d7a2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

nodescriptsTS/src/functions_platform_stats.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,16 @@ const getPlatformVersionPerRelease = async (browser_download_url) => {
9292
const getPluginPlatformVersionList = async (gituser, gitrepo, parent_folder = 'plugin_versions', is_new_plugin = false) => {
9393
let file_path = `${parent_folder}/${gitrepo}.json`;
9494
console.log("getPluginPlatformVersionList for", gituser, gitrepo, file_path, is_new_plugin)
95+
let current_file_temp = [];
96+
try{
97+
current_file_temp = is_new_plugin ? [] : await readFile.JSON(file_path);
98+
}
99+
catch(e){
100+
console.log("Error - Reading file ", file_path);
101+
console.log(e);
102+
}
95103

96-
const current_file = is_new_plugin ? [] : await readFile.JSON(file_path);
104+
const current_file = current_file_temp;
97105
const latest_tagName = ((current_file || [])[0] || {})['tagName'];
98106
const releases = await getReleases(gituser, gitrepo, latest_tagName) || [];
99107
console.log(gitrepo, ': New Releases');

0 commit comments

Comments
 (0)