Skip to content

Conversation

@Aspirin4k
Copy link

NodeJS automatically parses globs in argv, but the actual algorithm depends on shell.
Consider following example:

node .\index.js ..\..\Graphics\*.png

In WSL it will lead to files containing following

[ '../../Graphics/Button.png',
  '../../Graphics/ButtonCulprit.png',
  '../../Graphics/ButtonCulprit_selected.png',
  '../../Graphics/ButtonWide.png',
  '../../Graphics/ButtonWide_selected.png',   
  '../../Graphics/Button_selected.png',
  '../../Graphics/LabelSelectCulprit.png',
  '../../Graphics/Login.png',
  '../../Graphics/Modal.png' ]

While both in powershell and cmd files will contain

[ '..\\..\\Graphics\\*.png' ]

See nodejs/node#15529

Current logic inside generate function tries parsing glob only if it's not array (in reality it's array that contains single element)

in Windows OS terminals (cmd, powershell)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant