Skip to content

Update pulsar-install.sh to ensure proper quoting on _release_url variable#367

Open
jlorich wants to merge 1 commit intoexein-io:mainfrom
jlorich:patch-1
Open

Update pulsar-install.sh to ensure proper quoting on _release_url variable#367
jlorich wants to merge 1 commit intoexein-io:mainfrom
jlorich:patch-1

Conversation

@jlorich
Copy link

@jlorich jlorich commented Sep 11, 2025

Ensure proper quoting on _release_url variable

Updated the release URL variable to be quoted so it works more consistently across different shells and operating systems. On an older Ubuntu 20.04 machine this line would previously produce the following error:

sh: 103: local: https://api.github.com/repos/exein-io/pulsar/tarball/v0.9.0: bad variable name

I have

  • Tested installation on Ubuntu 20.04 (previously failing) and Debian 12.

@banditopazzo
Copy link
Member

I fixed clippy warnings in another PR, can you rebase this branch?

Update the release URL variable to be quoted so it works more consistently across different shells and operating systems. On an older Ubuntu 20.04 machine running bash, this line would previously produce the following error:

`sh: 103: local: https://api.github.com/repos/exein-io/pulsar/tarball/v0.9.0: bad variable name`

# Download release archive
local _release_url=$(curl -s https://api.github.com/repos/exein-io/pulsar/releases/tags/${PULSAR_VERSION} | grep "tarball_url" | cut -d : -f 2,3 | tr -d , | tr -d \")
local _release_url="$(curl -s https://api.github.com/repos/exein-io/pulsar/releases/tags/${PULSAR_VERSION} | grep "tarball_url" | cut -d : -f 2,3 | tr -d , | tr -d \")"
Copy link
Member

Choose a reason for hiding this comment

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

quoting doesn't trim a leading whitespace:

export PULSAR_VERSION=v0.9.0

~ export url="$(curl -s https://api.github.com/repos/exein-io/pulsar/releases/tags/${PULSAR_VERSION} | grep "tarball_url" | cut -d : -f 2,3 | tr -d , | tr -d \")"

~ printf '%s\n' "$url"
 https://api.github.com/repos/exein-io/pulsar/tarball/v0.9.0

~ 

please note the leading whitespace

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.

2 participants