-
-
Notifications
You must be signed in to change notification settings - Fork 18
I tried 0.7.3 and the cli doesn't work yet. #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@giuseppeg Hello,
The use of quotes is due to the fact that when using a pattern like
console.log(process.argv.slice(2));
$ node test.js * Such a script will work correctly. node lib/cli.js "fixtures/**/*.html" -r test -a -o outFolder
fast-glob works correctly, the problem lies in node lib/cli.js "fixtures/**/*.html" "!input-nesting" -r test -o outFolder transform to node lib/cli.js "fixtures/**/*.html" "nesting" -r test -o outFolder and try execute zsh: event not found: input As expected, it was all about shielding node lib/cli.js "**/*.html" "\!input-nesting" -r test/fixtures -o outFolder
"build-one": "node lib/cli.js '**/*.html' !input-nesting -r test/fixtures -o outFolder",
"build-two": "node lib/cli.js '**/*.html' !**/one-io -r test/fixtures -o outFolder" |
@Scrum I use bash instead of zsh and the CLI received the pattern just fine. When quoted, Then fast-glob will use the CLI args and find or exclude files just fine - that was the case with an older version of posthtml-cli before you changed it to resolve them to absolute paths. What was the reason to prefix the patters with the absolute path? |
For a correct resolution relative to the root directory |
ah ok! I was indeed doing this in my own script and that messed things up |
I tried 0.7.3 and the cli doesn't work yet. Here is how I use it:
(notice the glob patterns are quoted so that the shell doesn't expand them).
In order for fast-glob to grab those files you shouldn't resolve the path to absolute - you should remove the following line
posthtml-cli/src/cfg-resolve.js
Line 32 in 4616152
Originally posted by @giuseppeg in #313 (comment)
The text was updated successfully, but these errors were encountered: