mirror of https://github.com/status-im/metro.git
Use "writeFileSync" instead of "writeFile"
Reviewed By: cpojer Differential Revision: D7110494 fbshipit-source-id: 3024227431317a446ec23d2c78cde8a66c49d41f
This commit is contained in:
parent
da45d64c76
commit
123f1cfd42
|
@ -42,14 +42,8 @@ class FileStore {
|
|||
}
|
||||
}
|
||||
|
||||
set(key: Buffer, value: TransformedCode): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const data = serializer.serialize(value);
|
||||
|
||||
fs.writeFile(this._getFilePath(key), data, err => {
|
||||
err ? reject(err) : resolve();
|
||||
});
|
||||
});
|
||||
set(key: Buffer, value: TransformedCode): void {
|
||||
fs.writeFileSync(this._getFilePath(key), serializer.serialize(value));
|
||||
}
|
||||
|
||||
_getFilePath(key: Buffer): string {
|
||||
|
|
Loading…
Reference in New Issue