Skip to content

Commit

Permalink
Check memory to use is always greater than zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Gavin committed May 18, 2020
1 parent fa0a733 commit 97ef912
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/finalize-db.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/finalize-db.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/finalize-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function getMemoryFlag(): string {
const memoryToUseString = core.getInput("ram");
if (memoryToUseString) {
memoryToUseMegaBytes = Number(memoryToUseString);
if (Number.isNaN(memoryToUseMegaBytes)) {
if (Number.isNaN(memoryToUseMegaBytes) || memoryToUseMegaBytes <= 0) {
throw new Error("Invalid RAM setting \"" + memoryToUseString + "\", specified.");
}
} else {
Expand Down

0 comments on commit 97ef912

Please sign in to comment.