mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-11-05 04:47:54 +00:00
Properly log errors with injected files
This commit is contained in:
parent
9f3dfdc315
commit
80b10d690e
@ -26,12 +26,12 @@ function buildApp(src, dest, options, callback) {
|
||||
fs.writeFileSync(path.join(dest, '/nativefier.json'), JSON.stringify(appArgs));
|
||||
|
||||
maybeCopyScripts(options.inject, dest)
|
||||
.catch(error => {
|
||||
console.warn(error);
|
||||
})
|
||||
.then(() => {
|
||||
changeAppPackageJsonName(dest, appArgs.name, appArgs.targetUrl);
|
||||
callback();
|
||||
})
|
||||
.catch(error => {
|
||||
callback(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -45,7 +45,7 @@ function maybeCopyScripts(srcs, dest) {
|
||||
const promises = srcs.map(src => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!fs.existsSync(src)) {
|
||||
resolve();
|
||||
reject('Error copying injection files: file not found');
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user