csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Plugins - better support for dotnet tool commands

Open belav opened this issue 2 years ago • 2 comments

          still exists for csharpier v0.24.1 + rider plugin v1.3.7 + macOS + globally installed tool.

since it's hard to set PATH environment variable for macOS GUI apps, the PATH env is default and does not contain dotnet tools install -g dir. ~/.dotnet/tools/

$ which dotnet-csharpier
/Users/magicdawn/.dotnet/tools/dotnet-csharpier

suggestions:

  • replace dotnet csharpier --version with sh -c "dotnet csharpier --version" on posix systems (unix & macOS), let shell loads PATH from .bash_profile / .zshenv etc
  • add search support for ~/.dotnet/tools, since it's the default global install location. see https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install#description

https://github.com/belav/csharpier/blob/rider-1.3.7/Src/CSharpier.Rider/src/main/java/com/intellij/csharpier/CSharpierProcessProvider.java#L161


And a note for other macOS users want to set PATH for GUI apps

launchctl config user path "xxxx1:xxxx2:xxxx3", requires reboot

see https://github.com/hschmidt/EnvPane#why-cant-i-set-path-with-envpane

Originally posted by @magicdawn in https://github.com/belav/csharpier/issues/716#issuecomment-1532178103

belav avatar May 08 '23 14:05 belav

Related

Cannot format in Rider. I'm getting SEVERE - #c.i.c.CSharpierLogger - Cannot run program "dotnet": error=2, No such file or directory This is on linux. Seems that adding env DOTNET_ROOT fixed the problem

belav avatar Sep 25 '23 22:09 belav

See if we can use the same option rider uses for finding dotnet if it is not available on the PATH. It is at Settings | Build,Execution,Deployment | and Build | .NET Core CLI executable path Can we retrieve it somehow?

belav avatar Feb 12 '24 03:02 belav