Skip to content

Commit

Permalink
Fix reported source buffer size in fs.writeFileSync() error message
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Apr 9, 2024
1 parent b672db9 commit eee2384
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-dots-think.md
@@ -0,0 +1,5 @@
---
"nxjs-runtime": patch
---

Fix reported source buffer size in `fs.writeFileSync()` error message
2 changes: 1 addition & 1 deletion source/fs.c
Expand Up @@ -357,7 +357,7 @@ JSValue nx_write_file_sync(JSContext *ctx, JSValueConst this_val, int argc, JSVa

if (result != size)
{
JS_ThrowTypeError(ctx, "Failed to write entire file. Got %lu, expected %lu", result, result);
JS_ThrowTypeError(ctx, "Failed to write entire file. Got %lu, expected %lu", result, size);
return JS_EXCEPTION;
}

Expand Down

0 comments on commit eee2384

Please sign in to comment.