Closed yekanchi closed 2 years ago
someone reported the same issue https://github.com/JanDeDobbeleer/oh-my-posh/issues/1254 The way we retrieve the version(using ng version) is known to be slow It should also be slow if you call ng version manually
@yekanchi yes, that's the angular CLI which is suuuuuper slow. We could fallback to parsing the value inside the json file but I don't have a setup yet to facilitate debugging that.
also, it seams if the local angular version for the project is lower than the global version, the prompt is ruined.
the red lines are angular block:
@yekanchi yes, that's because that should never the case, right? At least, that was my assumption... I'm in favour of removing the CLI call for parsing the local package.json
or context inside the node_modules
folder. Can you share that information with me?
@JanDeDobbeleer this is certainly often the case... we have several Angular projects and fix the cli version in our devcointainers ( we develop with VS Code dev containers ). But the global install on the dev machine will be higher because the dev is looking at the new features for other projects.
@Depechie the good news is that @lnu created a PR to parse the info in the node_modules
folder.
@Depechie hope it will suit your need. Can you confirm it works well on your side?
@lnu looking good it seems
this issue is resolved in version 6.29.1
of oh-my-posh
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
Adding an Angular block to show the angular version on the prompt, causes the blocks to delay around 4 secs before show-up.
oh-my-posh is speedy in non-anuglar folders. so I'm sure the delaying block is angular. I tried it with the new angular app with just basic node_modules. the result is delayed again. my angular version is 12.
Theme
custom theme:
What OS are you seeing the problem on?
Windows
Which shell are you using?
PowerShell, I'm using pwsh 7.2 (PowerShell core).
Log output