Skip to content

Commit

Permalink
Removed try-catch stamement
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwall committed Mar 10, 2024
1 parent 7131fe1 commit 0658217
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions copy_keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,16 @@ function updateJSONFiles(baseFileName, directory) {
}
}

try {
const directory = core.getInput('directory');

console.log("Printing the directory");
console.log(directory);
const directory = core.getInput('directory');

const resultCode = updateJSONFiles(`en-us.json`, directory);
console.log("Result Code: ", resultCode);
console.log("Printing the directory");
console.log(directory);

// Check if keys were not in alphabetical order
if (resultCode == 1) {
console.log("Files are not alphabetized");
core.setFailed('Keys are not alphabetized');
}
} catch (error) {
core.setFailed(error.message);
}
const resultCode = updateJSONFiles(`en-us.json`, directory);
console.log("Result Code: ", resultCode);

// Check if keys were not in alphabetical order
if (resultCode == 1) {
console.log("Files are not alphabetized");
core.setFailed('Keys are not alphabetized');
}

0 comments on commit 0658217

Please sign in to comment.