Skip to content

Commit

Permalink
fix: Write to extra book after backSuperDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
darcywong00 committed Aug 31, 2023
1 parent 7d74645 commit 8a173f0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,19 @@ if (options.json) {
processDirectory(options.directory);
} else if (options.backSuperDirectory) {
// Make all book folders from a back translation super folder into SFM book files
processBackSuperDirectory(options.backSuperDirectory);
processBackSuperDirectory(options.backSuperDirectory).then(script1 => {
// Extra write of SFM Console log to extra book file after all the async processing finished
s.writeLog();
});
} else if (options.superDirectory) {
// Make all book folders from a super folder into SFM book files
processSuperDirectory(options.superDirectory);
}

// Write SFM Console log to extra book file
s.writeLog();
if (!options.backSuperDirectory) {
s.writeLog();
}

console.log('All done processing');
////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 8a173f0

Please sign in to comment.