scaffolder: show dry-run error cause

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-06-21 09:47:10 +02:00
parent ba6a14226a
commit 37539e29d8
2 changed files with 16 additions and 5 deletions
@@ -212,11 +212,17 @@ export function TemplateEditorFormDirectoryEditorDryRun(
return;
}
await dryRun.execute({
templateContent: selectedFile.content,
values: data,
files: directoryEditor.files,
});
try {
await dryRun.execute({
templateContent: selectedFile.content,
values: data,
files: directoryEditor.files,
});
setErrorText();
} catch (e) {
setErrorText(String(e.cause || e));
throw e;
}
};
const content =