mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-04 04:22:33 +02:00
#462 - Fix issue in script error notification
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
- Fix field error message color
|
||||
- [#433](https://github.com/estruyf/vscode-front-matter/issues/433): Fix issue with rendering an incorrect title value on the content dashboard
|
||||
- [#462](https://github.com/estruyf/vscode-front-matter/issues/462): Fix issue in script error notification
|
||||
|
||||
## [8.1.2] - 2022-10-06
|
||||
|
||||
|
||||
@@ -195,7 +195,11 @@ export class CustomScript {
|
||||
const output = await CustomScript.executeScript(script, wsPath, `"${wsPath}" "${contentPath}" ${articleData}`);
|
||||
return output;
|
||||
} catch (e) {
|
||||
Notifications.error(`${script.title}: ${(e as Error).message}`);
|
||||
if (typeof e === "string") {
|
||||
Notifications.error(`${script.title}: ${e}`);
|
||||
} else {
|
||||
Notifications.error(`${script.title}: ${(e as Error).message}`);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -285,6 +289,7 @@ export class CustomScript {
|
||||
exec(fullScript, (error, stdout) => {
|
||||
if (error) {
|
||||
reject(error.message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (stdout && stdout.endsWith(`\n`)) {
|
||||
|
||||
Reference in New Issue
Block a user