Skip to content

Commit

Permalink
build v1.0.4 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
bloep authored Feb 10, 2022
1 parent 9b2fe31 commit a66431a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41692,7 +41692,26 @@ async function readPackageYml(addonDir) {
const packageYmlPath = external_path_default().join(addonDir, '/', 'package.yml');
core.info(`Parsing yaml from ${packageYmlPath}`);
const packageYmlString = external_fs_default().readFileSync(packageYmlPath, { encoding: 'utf8' });
return yaml_default().parse(packageYmlString);
try {
return yaml_default().parse(packageYmlString, {
prettyErrors: true,
});
}
catch (originalError) {
core.error(`Failed to parse yaml from ${packageYmlPath}. Try to fix it automatically.`);
const fixedPackageYmlString = packageYmlString.replace(/(perm:[.\s\n\r\t]*)([a-z0-9_]+\[[a-z0-9_]+\])/ig, `$1'$2'`);
try {
const parsedYaml = yaml_default().parse(fixedPackageYmlString, {
prettyErrors: true,
});
core.info(`Successfully parsed yaml with fixed values.`);
return parsedYaml;
}
catch (_) {
core.error(`Automatically fixed yaml failed. Please fix it manually.`);
throw originalError;
}
}
}
function md5_file(file) {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@friendsofredaxo/installer-action",
"version": "1.0.3",
"version": "1.0.4",
"description": "MyREDAXO for GitHub Actions",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit a66431a

Please sign in to comment.