Skip to content

Commit cb93283

Browse files
DuanPengfeiaddaleax
authored andcommitted
doc: path.relative uses cwd
PR-URL: #13714 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent d0f39cc commit cb93283

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/path.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ changes:
445445
* `to` {string}
446446
* Returns: {string}
447447

448-
The `path.relative()` method returns the relative path from `from` to `to`.
449-
If `from` and `to` each resolve to the same path (after calling `path.resolve()`
450-
on each), a zero-length string is returned.
448+
The `path.relative()` method returns the relative path from `from` to `to` based
449+
on the current working directory. If `from` and `to` each resolve to the same
450+
path (after calling `path.resolve()` on each), a zero-length string is returned.
451451

452452
If a zero-length string is passed as `from` or `to`, the current working
453453
directory will be used instead of the zero-length strings.

0 commit comments

Comments
 (0)