#369 - required fields

This commit is contained in:
Elio Struyf
2022-09-15 11:13:26 +02:00
parent c6273fa9c1
commit e455fa764b
41 changed files with 974 additions and 459 deletions
+7
View File
@@ -14,6 +14,7 @@ import { DashboardCommand } from '../dashboardWebView/DashboardCommand';
import { ParsedFrontMatter } from '../parsers';
import { TelemetryEvent } from '../constants/TelemetryEvent';
import { SETTING_CUSTOM_SCRIPTS } from '../constants';
import { existsSync } from 'fs';
export class CustomScript {
@@ -272,6 +273,12 @@ export class CustomScript {
}
const scriptPath = join(wsPath, script.script);
if (!existsSync(scriptPath)) {
reject(new Error(`Script not found: ${scriptPath}`));
return;
}
const fullScript = `${command} ${scriptPath} ${args}`;
Logger.info(`Executing: ${fullScript}`);