microsoft/mona-saas

[BUG] lp=$1 breaks if condition checking for requirements

dan-leanix opened this issue · 3 comments

Describe the bug
The lp=$1 assignment in the checks breaks the if statement that follows afterwards. For instance, https://github.com/microsoft/mona-saas/blob/main/Mona.SaaS/Mona.SaaS.Setup/basic-deploy.sh#L29-L35

The if statement always returns 0 for the latest status code as lp=$1 directly runs after dotnet --version >/dev/null 2>&1 and always succeeds with exit code 0.

Hence, my initial setup failed to compile and upload the .NET application to the Azure Web App as .NET is missing on my MacBook.

To Reproduce
Have a MacBook without .NET installed. The pre-check will return true that .NET is installed instead of aborting the setup.

Expected behavior
That the setup script fails if I do not meet the prerequisites.

Great catch on this, @dan-leanix. Can confirm that this is a bug. Quick question -- since you obviously know the issue, are you open to submitting a PR to correct it? We're happy to correct it if not.

@caseywatson Sure will open a PR tomorrow.

I'm glad. Like I said, we could easily fix it but I'm hoping that this will be the first of many ISV community-submitted PRs.