# This function helps user to check known environment errors. (especially for windows user)
[[$ANTIDOTE_DISABLE_ENV_CHECK= 1 ]]&&return
type curl | grep-i system32 > /dev/null &&{
echo2 "Error: You are using curl.exe provided by Windows OS ($(type curl)). It's very likely that 'curl -o' will fail because of different directory tree. "
echo2 "You are recommended to install curl.exe provided by your GNU environment. (Usually MSYS, Cygwin or MinGW)"
echo2 "Run 'curl https://google.com -o /tmp/out.html' to see if you are victim of this error. If you are sure it's not a problem, set ANTIDOTE_DISABLE_ENV_CHECK=1 to disable the check. "
return 1
}
type json2table > /dev/null ||{
echo2 "Error: You must install the dependency 'json2table'. You may compile from source at https://git.recolic.net/root/json2table/, or download pre-built windows executable at https://m365fleetagc.visualstudio.com/Core/_git/antidote-CIS-windows"
echo2 "If you are sure it's not a problem, set ANTIDOTE_DISABLE_ENV_CHECK=1 to disable the check. "