Commit 8b97249
fs: fix the error report on fs.link(Sync)
As the Node.js documentation specified:
> fs.link(srcpath, dstpath, callback)
But when we run:
```js
> fs.link()
```
We will get the below:
```js
TypeError: dest path must be a string
at TypeError (native)
at Object.fs.link (fs.js:915:11)
at repl:1:4
```
Just correct the message of relevant 2 errors in this PR :-)
PR-URL: #3917
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 9472a0c commit 8b97249Copy full SHA for 8b97249
File tree
Expand file treeCollapse file tree
2 files changed
+20
-4
lines changedOpen diff view settings
Filter options
- src
- test/parallel
Expand file treeCollapse file tree
2 files changed
+20
-4
lines changedOpen diff view settings
Collapse file
+4-4Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
615 | 615 | |
616 | 616 | |
617 | 617 | |
618 | | - |
619 | | - |
620 | 618 | |
| 619 | + |
| 620 | + |
621 | 621 | |
622 | | - |
623 | | - |
624 | 622 | |
| 623 | + |
| 624 | + |
625 | 625 | |
626 | 626 | |
627 | 627 | |
|
Collapse file
test/parallel/test-fs-link.js
Copy file name to clipboardExpand all lines: test/parallel/test-fs-link.js+16Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
18 | 18 | |
19 | 19 | |
20 | 20 | |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
0 commit comments