Setup script doesn't work on Mac - `command not found: dotnet-episerver`
Describe the bug
Running setup.sh script doesn't fully work on a Mac with no prior Optimizely installations. It fails on dotnet-episerver tool, as the tool cannot be found. Running the tool as dotnet episerver instead resolves the issue. In my opinion running dotnet episerver is a bit more universal, as we don't care whether that specific tool is in the $PATH variable or not.
Disclaimer: I'm no .NET Core expert, so this bug might originate from my ignorance
To Reproduce Steps to reproduce the behavior:
-
git clone https://github.com/episerver/Foundation.git -
cd Foundation -
git checkout main -
chmod u+x setup.sh -
./setup.sh
Expected behavior The setup script should run to completion successfully
Desktop (please complete the following information):
- OS: macOS Monterey 12.4
- Shell: Z
I'd be happy to create a PR for this bug, if you think both this bug, and the proposed solution make sense.
I was struggling with the same more than once. Using bash instead of Zsh made it. Not a good solution, but nevertheless a solution.
Looks like this might tie in to this old path issue with dotnet and zsh -- https://github.com/dotnet/sdk/issues/9415 https://github.com/dotnet/sdk/issues/10986
I don't see an issue with the approach above (using dotnet episerver instead of dotnet-episerver in the script) -- both commands seem to run the same in Linux. If I read it correctly, this thread also implies dash vs space is somewhat interchangeable: https://github.com/dotnet/docs/issues/29676
@lunchin, any concerns?