1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 23:38:06 +02:00

Handle version file in doctor

This commit is contained in:
Shane Kilkelly 2020-07-09 11:31:06 +01:00
parent 380a1fe37f
commit 19d102febb

View file

@ -116,10 +116,8 @@ function print_warnings() {
function check_config_files() {
print_section_separator "Configuration"
image_version="$(head -z -n 1 ./lib/sharelatex-image-version)"
print_point 0 "image version: $image_version"
config_files=(
"config/version"
"config/overleaf.rc"
"config/variables.env"
)
@ -131,8 +129,9 @@ function check_config_files() {
add_warning "configuration file $config_file not found"
else
print_point 1 "status: present"
# If this is the RC file, print additional info
if [[ "$config_file" == "config/overleaf.rc" ]]; then
if [[ "$config_file" == "config/version" ]]; then
print_point 1 "version: $(head -n 1 $config_file)"
elif [[ "$config_file" == "config/overleaf.rc" ]]; then
print_point 1 "values"
# Load vars from the rc file
# shellcheck disable=SC1090