Skip to content

Commit

Permalink
Coverted error message to multiline string literal and used turnarty
Browse files Browse the repository at this point in the history
operator on error message to ensure it isn't undefined.
  • Loading branch information
s-weigand committed Apr 4, 2021
1 parent bda73eb commit 20d0f2d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.js
Expand Up @@ -58,14 +58,14 @@ async function main() {
await cache.saveCache(cachePaths, cacheKey);
} catch (e) {
core.warning(
[
"There was an error saving the pre-commit environments to cache:\n\n",
`${e.message}\n\n`,
"This only has performance implications and won't change the result of your pre-commit tests.\n",
"If this problem persists on your default branch, you can try to fix it by editing your '.pre-commit-config.yaml'. ",
"I.e. run 'pre-commit autoupdate' or simply add a blank line. ",
"This will result in a different hash value and thus a different cache target.",
].join("")
`There was an error saving the pre-commit environments to cache:
${e.message ? e.message : e}
This only has performance implications and won't change the result of your pre-commit tests.
If this problem persists on your default branch, you can try to fix it by editing your '.pre-commit-config.yaml'.
I.e. run 'pre-commit autoupdate' or simply add a blank line.
This will result in a different hash value and thus a different cache target.`.replace(/ +/g, '')
);
}
}
Expand Down

0 comments on commit 20d0f2d

Please sign in to comment.