Foundation icon indicating copy to clipboard operation
Foundation copied to clipboard

Setup script doesn't work on Mac - `command not found: dotnet-episerver`

Open gcichosz opened this issue 3 years ago • 2 comments

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:

  1. git clone https://github.com/episerver/Foundation.git
  2. cd Foundation
  3. git checkout main
  4. chmod u+x setup.sh
  5. ./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.

gcichosz avatar Jun 13 '22 14:06 gcichosz

I was struggling with the same more than once. Using bash instead of Zsh made it. Not a good solution, but nevertheless a solution.

clairan avatar Jun 17 '22 09:06 clairan

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?

daniel-isaacs avatar Jun 27 '22 21:06 daniel-isaacs