microsoft / artifacts-credprovider

The Azure Artifacts Credential Provider enables dotnet, NuGet.exe, and MSBuild to interactively acquire credentials for Azure Artifacts feeds.
MIT License
747 stars 709 forks source link

Changed install script to make it compatible for sh on linux #457

Closed amp-powell closed 9 months ago

amp-powell commented 9 months ago

The PR changes the syntax of the credprovider install script to make it compatible with shell. Fixes bug #2100273 and this bug https://github.com/microsoft/artifacts-credprovider/issues/450

JohnSchmeichel commented 9 months ago

Works with default options, but if I set AZURE_ARTIFACTS_CREDENTIAL_PROVIDER_VERSION then I get errors:

export AZURE_ARTIFACTS_CREDENTIAL_PROVIDER_VERSION=v1.1.0-alpha
sh -c "$(curl -fsSL https://raw.githubusercontent.com/microsoft/artifacts-credprovider/ba93b5218249ec3792470f9b2f48c91bd930a016/helpers/installcredprovider.sh)"

still gives me an error sh: 19: [: v1.1.0-alpha: unexpected operator

phil-hodgson commented 9 months ago

If we're making this work for environments without bash, should we also update the file's shebang?

ksigmund commented 9 months ago

If we're making this work for environments without bash, should we also update the file's shebang?

Is our posture to support the lowest common denominator?

phil-hodgson commented 9 months ago

The issue customers faced is that on some environments, the customer had to first install bash before they could get the cred provider installed. The installation script should work whether bash is available or not.