Skip to content

Conversation

commit111
Copy link
Contributor

@commit111 commit111 commented Nov 15, 2024

Description

Note: A better version of this is #878

Replaced the Shell installation . <(curl -Ls https://s.defang.io/install) with eval "$(curl -Ls https://s.defang.io/install)" to fix the issue of process substitution not being available on older versions of Bash.

There was discussion on other alternatives:

  • . /dev/stdin <<<"$(curl -Ls https://s.defang.io/install)" - good but a little long-looking
  • curl -Ls https://s.defang.io/install | sh - cannot use defang immediately without refreshing after 1st install

If you have any opinion on which command to use, please comment below.

Linked Issues

Fixes #631
Updated /defang-docs repo DefangLabs/defang-docs#115
Updated /samples repo DefangLabs/samples#258
Updated /docs-chatbot repo DefangLabs/docs-chatbot#19

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

Copy link
Member

@lionello lionello left a comment

Choose a reason for hiding this comment

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

The reason we used . <(curl …) vs curl … | sh is that in the latter case you won't be able to run defang right after the 1st installation, since the installer won't be able to change PATH of the calling shell.

Copy link
Member

@lionello lionello left a comment

Choose a reason for hiding this comment

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

Awesome! Can you check the other repos as well (defang-docs etc.)?

@lionello lionello merged commit 5999d53 into main Nov 19, 2024
5 checks passed
@lionello lionello deleted the linda-fix-bash branch November 19, 2024 01:47
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.

Default install command fails on bash
3 participants