Prettier doesn't work because afterAllFileWrite pass paths without quotes #7088
Unanswered
nik-tolstik
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Command
Error Log
Description of problem
Works on all OS platfroms. Prettier doesn't work with absolute paths that have spaces without wrapped double quotes
Run the following script without the double quotes of the path and you will get an error message
prettier --write <path with inner spaces>.afterAllFileWritepasses the absolute paths without double quotes.My actual solutions
afterAllFileWritepackage.json:Remove the gaps in the path to your project.
For example:
C:/Users/username/Desktop/My Projects/project/src/app/components/example/duck/operations.generated.ts ->
C:/Users/username/Desktop/my-projects/project/src/app/components/example/duck/operations.generated.ts
Expected behavior
Prettier should overwrite all generated files without errors. My solution is bad because it is not optimized and unsafe.
Environment:
package.jsoncodegen.ymlBeta Was this translation helpful? Give feedback.
All reactions