diff options
Diffstat (limited to 'gjs/src/file.ts')
-rw-r--r-- | gjs/src/file.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gjs/src/file.ts b/gjs/src/file.ts index d15474b..8875833 100644 --- a/gjs/src/file.ts +++ b/gjs/src/file.ts @@ -9,7 +9,8 @@ export function readFileAsync(path: string): Promise<string> { Astal.read_file_async(path, (_, res) => { try { resolve(Astal.read_file_finish(res) || "") - } catch (error) { + } + catch (error) { reject(error) } }) @@ -25,7 +26,8 @@ export function writeFileAsync(path: string, content: string): Promise<void> { Astal.write_file_async(path, content, (_, res) => { try { resolve(Astal.write_file_finish(res)) - } catch (error) { + } + catch (error) { reject(error) } }) |