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> {
|
set(key: Buffer, value: TransformedCode): void {
|
||||||
return new Promise((resolve, reject) => {
|
fs.writeFileSync(this._getFilePath(key), serializer.serialize(value));
|
||||||
const data = serializer.serialize(value);
|
|
||||||
|
|
||||||
fs.writeFile(this._getFilePath(key), data, err => {
|
|
||||||
err ? reject(err) : resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_getFilePath(key: Buffer): string {
|
_getFilePath(key: Buffer): string {
|
||||||
|
|
Loading…
Reference in New Issue