Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl path download file extension added #1896

Merged
merged 1 commit into from Mar 16, 2021
Merged

curl path download file extension added #1896

merged 1 commit into from Mar 16, 2021

Conversation

pinakighatak
Copy link
Contributor

Contributing a feature

The latest version of curl confuses between a directory and file without extension when downloading form a URL. So in this PR, have added an extension to the bicep binary download, and rename it back when moving to the folder. This works.

Also added an environment variable for the resource group parameter. The docs did not illustrate this correctly.

curl -Lo bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./bicep
sudo mv ./bicep /usr/local/bin/bicep
curl -Lo bicep.bin https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anthony-c-martin - any idea why @pinakighatak needed to add the .bin extension here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any extension will work. I just put bin. Curl does not seem to work without this extension.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure - I've not had any problems running this command on OSX, Linux or WSL.

@pinakighatak Does the following work for you by any chance (specifying the current directory with ./)?

curl -Lo ./bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64

It doesn't matter much, as this is just a temporary name before the exe is moved to /usr/local/bin/bicep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying this directly on my GitHub workflow pipeline. Adding ./bicep does not work. See below:
image

But adding an extension (any) works smoothly.
image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given the extension doesn't matter, I'm inclined to merge this.

@alex-frankel alex-frankel merged commit 82210d7 into Azure:main Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants