solo-io / bumblebee

Get eBPF programs running from the cloud to the kernel in 1 line of bash
Apache License 2.0
1.26k stars 78 forks source link

Expand the alias in the script on Debian/Ubuntu #81

Closed jkremser closed 2 years ago

jkremser commented 2 years ago

man page says: Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the descriptioin of shopt under SHELL BUILTIN COMMANDS below).

When using the install script on ubuntu I am getting this:

λ limactl shell ebpf2 bash -- ./install-bee.sh
++ command -v python3
+ '[' -x /usr/bin/python3 ']'
+ alias any_python=python3
+ '[' -z '' ']'
++ curl '-sHAccept: application/vnd.github.v3+json' -k https://api.github.com/repos/solo-io/bumblebee/releases
++ any_python -c 'import sys; from distutils.version import StrictVersion, LooseVersion; from json import loads as l; releases = l(sys.stdin.read()); releases = [release['\''tag_name'\''] for release in releases];  filtered_releases = list(filter(lambda release_string: len(release_string) > 0 and StrictVersion.version_re.match(release_string[1:]) != None, releases)); filtered_releases.sort(key=LooseVersion, reverse=True); print('\''\n'\''.join(filtered_releases))'
./install-bee.sh: line 18: any_python: command not found

shopt -s expand_aliases fixes this issue

Signed-off-by: Jirka Kremser jiri.kremser@gmail.com

solo-build-bot[bot] commented 2 years ago

Waiting for approval from someone in the solo-io org to start testing.

lgadban commented 2 years ago

looks like this broke our standard installation script -- can you try using the install script in sh instead of bash?

we'll revert this change for now

linsun commented 2 years ago

Thanks @lgadban! This change did break my env today during a live demo at ossummit as I don't have shopt.