Commit 736782d
committed
Fix tests when run in paths with spaces
Previously, on Windows and Linux (comment here was incorrect) these
tests failed if the path contained spaces, because the err.source
property used %20 instead of a literal space. This happens because
internal path representations are used, instead of the actual path.
This change ensures that the path representations are at least decoded
correctly before any errors are thrown, ensuring that usable paths are
returned. It is possible to go further and use url.toFileSystemPath to
fully transform the URL-formatted path into a standard platform-specific
filesystem path, but this could be a breaking change for some use cases,
because it would change from unix to Windows paths on Windows, for
example.1 parent f6886ab commit 736782d
File tree
4 files changed
+3
-10
lines changed- lib
- test/specs/error-source
4 files changed
+3
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 33 | | |
41 | 34 | | |
42 | 35 | | |
| |||
0 commit comments