0

I installed dart by choco install dart-sdk. When choco adds any path in the PATH environment variable, I will check this. In my case, the choco said PATH environment variable does not have C:\Users\user_name\AppData\Roaming\Pub\Cache\bin in it. Adding... and the choco adds this in my path environment variable. But my computer doesn't have Pub\Cache\bin in the Roaming folder!?

Is this normal? Why does the choco add this path in the path environment variable? Should I delete this path from the PATH environment variable?

  • Does this answer your question? [pub global activate command - $HOME/.pub-cache/bin not on path](https://stackoverflow.com/questions/52794266/pub-global-activate-command-home-pub-cache-bin-not-on-path) And the answer: https://stackoverflow.com/a/70693653/724039 – Luuk Oct 16 '22 at 07:45
  • I think not. I edited my question to be easier to explain. – Sittiphan Sittisak Oct 16 '22 at 07:57
  • see: https://dart.dev/tools/pub/cmd/pub-cache If is the directory used by `dart pub cache ....`. This directory is empty after install, which seems logical. (I do not have enough knowledge about dart to explain more) – Luuk Oct 16 '22 at 08:11
  • oops, cache is in `%LOCALAPPDATA%\Pub\Cache`, not in `%APPDATA%\Pub\Cache` – Luuk Oct 16 '22 at 08:15
  • [pub uses %APPDATA% and not %LOCALAPPDATA% #22954](https://github.com/dart-lang/sdk/issues/22954) and [pub uses %APPDATA% and not %LOCALAPPDATA% #1273](https://github.com/dart-lang/pub/issues/1273) – Luuk Oct 16 '22 at 08:22
  • But question is off-topic, because it's not about programming. Also choco has nothing to do (should have nothing to do) with install of `dart`. Managing PATH is an OS issue. – Luuk Oct 16 '22 at 08:25
  • What do you think about this? Should I delete this path from the PATH environment variable or let this stay here? – Sittiphan Sittisak Oct 16 '22 at 08:27
  • Ask your systemadministrator , and do not be wondered when your dart application is failing when it tries to use that folder. This is beside the fact that it seems to have been defined wrong in the past (see the 2 github links in my earlier comment) – Luuk Oct 16 '22 at 08:29

0 Answers0