mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
fix: created patches were not saving in npm module
This commit is contained in:
parent
a4cead0515
commit
1ee279b014
1 changed files with 5 additions and 1 deletions
6
index.js
6
index.js
|
@ -58,13 +58,17 @@ program
|
|||
.description('creates a patch based on two ROMs')
|
||||
.argument('<original_rom_file>', 'the original ROM')
|
||||
.argument('<modified_rom_file>','the modified ROM')
|
||||
.option('-f, --format','patch format (allowed values: ips [default], bps, ppf, ups, aps, rup)')
|
||||
.option('-f, --format <format>','patch format (allowed values: ips [default], bps, ppf, ups, aps, rup)')
|
||||
.action(function(originalRomPath, modifiedRomPath, options) {
|
||||
console.log(options);
|
||||
try{
|
||||
const originalFile=new BinFile(originalRomPath);
|
||||
const modifiedFile=new BinFile(modifiedRomPath);
|
||||
|
||||
const patch=RomPatcher.createPatch(originalFile, modifiedFile, options.format);
|
||||
const patchFile=patch.export();
|
||||
patchFile.setName(modifiedFile.getName());
|
||||
patchFile.save();
|
||||
}catch(err){
|
||||
console.log(chalk.bgBlue('Error: ' + err.message));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue