mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-25 14:41:16 +08:00
fix: replace fs-extra.ensureFileSync with fs.writeFileSync (#1790)
This commit is contained in:
parent
839f9b878b
commit
f6e384a9ea
@ -298,13 +298,13 @@ class ProjectBuilder {
|
||||
return self.prepBuildFiles();
|
||||
}).then(() => {
|
||||
const signingPropertiesPath = path.join(self.root, `${opts.buildType}${SIGNING_PROPERTIES}`);
|
||||
|
||||
if (fs.existsSync(signingPropertiesPath)) fs.rmSync(signingPropertiesPath);
|
||||
if (opts.packageInfo) {
|
||||
fs.ensureFileSync(signingPropertiesPath);
|
||||
fs.writeFileSync(signingPropertiesPath, '', 'utf8');
|
||||
const signingProperties = createEditor(signingPropertiesPath);
|
||||
signingProperties.addHeadComment(TEMPLATE);
|
||||
opts.packageInfo.appendToProperties(signingProperties);
|
||||
} else {
|
||||
fs.rmSync(signingPropertiesPath, { force: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user