mirror of
https://github.com/apache/cordova-android.git
synced 2025-03-26 07:11: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();
|
return self.prepBuildFiles();
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const signingPropertiesPath = path.join(self.root, `${opts.buildType}${SIGNING_PROPERTIES}`);
|
const signingPropertiesPath = path.join(self.root, `${opts.buildType}${SIGNING_PROPERTIES}`);
|
||||||
|
|
||||||
if (fs.existsSync(signingPropertiesPath)) fs.rmSync(signingPropertiesPath);
|
|
||||||
if (opts.packageInfo) {
|
if (opts.packageInfo) {
|
||||||
fs.ensureFileSync(signingPropertiesPath);
|
fs.writeFileSync(signingPropertiesPath, '', 'utf8');
|
||||||
const signingProperties = createEditor(signingPropertiesPath);
|
const signingProperties = createEditor(signingPropertiesPath);
|
||||||
signingProperties.addHeadComment(TEMPLATE);
|
signingProperties.addHeadComment(TEMPLATE);
|
||||||
opts.packageInfo.appendToProperties(signingProperties);
|
opts.packageInfo.appendToProperties(signingProperties);
|
||||||
|
} else {
|
||||||
|
fs.rmSync(signingPropertiesPath, { force: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user