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
This is because the replace command dosent replace the tags and the body in the tags with <!-- usage -->. So when line 78 in readme.ts is executed it replaces the first tag and the rest of the body and the stop tag is left.
Possible mitigations: replace all occurences with \r\n with \n in commands/readme.ts. (readme = readme.replaceAll('\r\n', '\n')) or extends the regex to match \r\n as well.
Possible workarounds:
Just use LF in vs code
Make a script to replace CRLF with LF before running oclif readme.
This can then be inserted into the prepack command in package.json. For example: "prepack": "yarn build && oclif manifest && node prepreadme.js && oclif readme"
prepreadme.js:
oclif/src/commands/readme.ts
Line 75 in 58cefb3
Expected result after running npx oclif readme is that all 3 tags are replaced.
Actual result on windows with CRLF:
This is because the replace command dosent replace the tags and the body in the tags with
<!-- usage -->
. So when line 78 in readme.ts is executed it replaces the first tag and the rest of the body and the stop tag is left.Possible mitigations: replace all occurences with \r\n with \n in commands/readme.ts. (readme = readme.replaceAll('\r\n', '\n')) or extends the regex to match \r\n as well.
Possible workarounds:
This can then be inserted into the prepack command in package.json. For example: "prepack": "yarn build && oclif manifest && node prepreadme.js && oclif readme"
prepreadme.js:
Otherwise oclif works well on windows ^^
The text was updated successfully, but these errors were encountered: