You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the :\ passed to path.normalize() causes the function to add a .\. I believe it's related to this commit: 8306457. This might be intended behavior, but has the potential for functions that spawn or fork execs would break because of this change.
Here's a repro:
nvm use 20.11.1 ; node -e "const path = require('path'); console.log(path.normalize('powershell.exe echo \':\\hello!\''));"; nvm use 20.18.2 ; node -e "const path = require('path'); console.log(path.normalize('powershell.exe echo \':\\hello!\''));"
Now using node v20.11.1 (64-bit)
powershell.exe echo':\hello!'
Now using node v20.18.2 (64-bit)
.\powershell.exe echo':\hello!'
How often does it reproduce? Is there a required condition?
This behavior is observed if any part of the path passed to path.normalize() contains '.'
What is the expected behavior? Why is that the expected behavior?
It is not expected that '.' is added.
What do you see instead?
See the repro steps for expected and changed output.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Version
20.18.2
Platform
Subsystem
No response
What steps will reproduce the bug?
It looks like the :\ passed to
path.normalize()
causes the function to add a.\
. I believe it's related to this commit: 8306457. This might be intended behavior, but has the potential for functions that spawn or fork execs would break because of this change.Here's a repro:
How often does it reproduce? Is there a required condition?
This behavior is observed if any part of the path passed to
path.normalize()
contains '.'What is the expected behavior? Why is that the expected behavior?
It is not expected that '.' is added.
What do you see instead?
See the repro steps for expected and changed output.
Additional information
No response
The text was updated successfully, but these errors were encountered: