Skip to content

Commit f6e384a

Browse files
authored
fix: replace fs-extra.ensureFileSync with fs.writeFileSync (#1790)
1 parent 839f9b8 commit f6e384a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/builders/ProjectBuilder.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,13 @@ class ProjectBuilder {
298298
return self.prepBuildFiles();
299299
}).then(() => {
300300
const signingPropertiesPath = path.join(self.root, `${opts.buildType}${SIGNING_PROPERTIES}`);
301-
302-
if (fs.existsSync(signingPropertiesPath)) fs.rmSync(signingPropertiesPath);
303301
if (opts.packageInfo) {
304-
fs.ensureFileSync(signingPropertiesPath);
302+
fs.writeFileSync(signingPropertiesPath, '', 'utf8');
305303
const signingProperties = createEditor(signingPropertiesPath);
306304
signingProperties.addHeadComment(TEMPLATE);
307305
opts.packageInfo.appendToProperties(signingProperties);
306+
} else {
307+
fs.rmSync(signingPropertiesPath, { force: true });
308308
}
309309
});
310310
}

0 commit comments

Comments
 (0)