Skip to content

Commit

Permalink
VH 1303 - Added shell check rules based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DokurOmkar committed Jun 7, 2024
1 parent f94b92e commit ae93400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configuration/initialization.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ sudo apt update -y && sudo apt upgrade -y
sudo apt-get install chromium-browser -y

# Make passwords for mysql
mkdir -p secrets && cd secrets || return # return in case cd fails
mkdir -p secrets && cd secrets || return # SC2164 - Use return in case cd fails

# Creates password files where user inputs password
FILE1=mysql_root_password.txt
FILE2=mysql_password.txt
if test -f "$FILE1"; then
echo "$FILE1 exists."
else
read -r -p "enter password for the mysql_root_password: " sql_root_pass
read -r -p "enter password for the mysql_root_password: " sql_root_pass # SC2162 - read without -r will mangle backslashes
echo "$sql_root_pass" > sql_root_pass.txt
# Remove endline characters from password files
tr -d '\n' <sql_root_pass.txt> mysql_root_password.txt && rm sql_root_pass.txt
Expand Down

0 comments on commit ae93400

Please sign in to comment.