Skip to content

Commit

Permalink
Updated log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nichwall committed Mar 20, 2024
1 parent e00ab6a commit 2e98748
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions copy_keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ function updateJSONFiles(baseFileName, directory) {
const baseFilePath = path.join(directory, baseFileName);
const baseData = loadJSONFile(baseFilePath);

console.log("In updateJSONFiles");

// Sort the base data alphabetically by key (case insensitive)
const sortedBaseData = {};
Object.keys(baseData)
Expand Down Expand Up @@ -44,6 +42,7 @@ function updateJSONFiles(baseFileName, directory) {
// Copy missing fields from the base data
for (const key in sortedBaseData) {
if (!(key in otherData)) {
console.log(`Copying key '${key}' to '${filename}'`);
otherData[key] = sortedBaseData[key];
}
}
Expand All @@ -64,12 +63,9 @@ function updateJSONFiles(baseFileName, directory) {

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

console.log("Printing the directory");
console.log(directory);

try {
const resultCode = updateJSONFiles(`en-us.json`, directory);
console.log("Result Code: ", resultCode);
updateJSONFiles(`en-us.json`, directory);
console.log("All files in alphabetical order");
} catch (error) {
console.error(error.message);
core.setFailed(error.message);
Expand Down

0 comments on commit 2e98748

Please sign in to comment.