Skip to content

Commit 8b10362

Browse files
committed
[NRL-1922] Fix sonarqube issue with use of wget
1 parent dadf711 commit 8b10362

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

terraform/bastion/scripts/user-data.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ set -o errexit -o nounset -o pipefail
44

55
ASDF_VERSION="v0.18.0"
66

7+
export DEBIAN_FRONTEND=noninteractive
8+
79
sudo apt update && \
8-
sudo apt upgrade -y && \
9-
sudo apt install -y \
10+
sudo -E apt upgrade -y && \
11+
sudo -E apt install -y \
1012
git \
1113
jq \
12-
wget \
14+
curl \
1315
build-essential \
1416
unzip \
1517
gnupg \
@@ -42,11 +44,12 @@ output = json
4244
" >> /home/nrlf_ops/.aws/config'
4345

4446
# Install ASDF
45-
wget https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-amd64.tar.gz -O asdf.tar.gz && \
46-
tar -xzf asdf.tar.gz && \
47-
mv asdf /usr/bin/asdf && \
48-
chmod 755 /usr/bin/asdf && \
49-
rm asdf.tar.gz
47+
curl --location --silent --show-error --fail --output asdf.tar.gz \
48+
https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-amd64.tar.gz && \
49+
tar -xzf asdf.tar.gz && \
50+
mv asdf /usr/bin/asdf && \
51+
chmod 755 /usr/bin/asdf && \
52+
rm asdf.tar.gz
5053

5154
# Clone NRLF into nrlf_ops home directory
5255
sudo -u nrlf_ops git clone https://github.com/NHSDigital/NRLF.git /home/nrlf_ops/NRLF

0 commit comments

Comments
 (0)