mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Change name
within package.json
so that temporary files will not be shared across different app instances
This commit is contained in:
parent
cfd212bd94
commit
0897432062
@ -81,6 +81,13 @@ function copyPlaceholderApp(srcAppDir, tempDir, name, targetURL, badge, width, h
|
||||
};
|
||||
|
||||
fs.writeFileSync(path.join(tempDir, '/nativefier.json'), JSON.stringify(appArgs));
|
||||
|
||||
// change name of packageJson so that temporary files will not be shared across different app instances
|
||||
const packageJsonPath = path.join(tempDir, '/package.json');
|
||||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath));
|
||||
packageJson.name = appArgs.name + '-nativefier';
|
||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson));
|
||||
|
||||
callback(null, tempDir);
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user