fix: skip server requirements check based on file presence (#203729)

This commit is contained in:
Robo
2024-01-30 03:55:17 +09:00
committed by GitHub
parent a9ba0672ae
commit fc9dcad098
2 changed files with 32 additions and 4 deletions

View File

@@ -9,8 +9,19 @@ esac
ROOT="$(dirname "$(dirname "$(readlink -f "$0")")")"
# Do not remove this check.
# Provides a way to skip the server requirements check from
# outside the install flow. A system process can create this
# file before the server is downloaded and installed.
skip_check=0
if [ -f "/tmp/vscode-skip-server-requirements-check" ]; then
echo "!!! WARNING: Skipping server pre-requisite check !!!"
echo "!!! Server stability is not guaranteed. Proceed at your own risk. !!!"
skip_check=1
fi
# Check platform requirements
if [ "$(echo "$@" | grep -c -- "--skip-requirements-check")" -eq 0 ]; then
if [ "$(echo "$@" | grep -c -- "--skip-requirements-check")" -eq 0 ] && [ $skip_check -eq 0 ]; then
$ROOT/bin/helpers/check-requirements.sh
exit_code=$?
if [ $exit_code -ne 0 ]; then