Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

馃悰 On windows, glob pattern not working through package.json script (npm run command) #4186

Closed
1 task done
himaanshu24 opened this issue Feb 3, 2023 · 2 comments
Closed
1 task done
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@himaanshu24
Copy link

Environment information

CLI:
聽 Version:聽聽聽聽聽聽聽聽聽聽聽聽聽 11.0.0
聽 Color support:聽聽聽聽聽聽聽 true聽Platform:
聽 CPU Architecture:聽聽聽聽 x86_64
聽 OS:聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 windows聽Environment:
聽 ROME_LOG_DIR:聽聽聽聽聽聽聽聽 unset
聽 NO_COLOR:聽聽聽聽聽聽聽聽聽聽聽聽 unset
聽 TERM:聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 "xterm-256color"聽Rome Configuration:
聽 Status:聽聽聽聽聽聽聽聽聽聽聽聽聽聽 loaded
聽 Formatter disabled:聽聽 false
聽 Linter disabled:聽聽聽聽聽 false聽Workspace:
聽 Open Documents:聽聽聽聽聽聽 0

What happened?

package.json file

"scripts": {
    "lint:js": "npx rome check cartridges/**/cartridge/client/**/js/"
}

Running npx rome check cartridges/**/cartridge/client/**/js/ works flawlessly on both platforms - Mac and Windows.
But when running npm run lint:js it is working on Mac but not on the windows machine, throwing the following error:

- The filename, directory name, or volume label syntax is incorrect. (os error 123)

The issue only happens when using the glob pattern, it works if used as follows:

"scripts": {
    "lint:js": "npx rome check cartridges/FOLDER_NAME/cartridge/client/SUBFOLDER_NAME/js/"
}

Expected result

The behavior should be consistent across the different platforms. Running the npm run command with the glob pattern should work on windows as well.

Thanks

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@himaanshu24 himaanshu24 added the S-To triage Status: user report of a possible bug that needs to be triaged label Feb 3, 2023
@himaanshu24
Copy link
Author

@sebmck, don't we have the opposite of ignore (include) in the file object. This will give better flexibility in large and complex projects. It can have multiple patterns to traverse through, and the command can be only rome check

 "files": {
        "ignore": [
        ],
        "include": [ // proposed
        ],
    },

@ematipico
Copy link
Contributor

Closing because we don't support glob patterns vi CLI yet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants