Example #1
0
        /// <summary>
        /// Checks the installations of the required packages (bitwarden, npm)
        /// </summary>
        /// <returns></returns>
        private static async Task CheckInstallations(AppSettings appSettings)
        {
            bool checkInstallations = bool.Parse(appSettings.GetByKey(AppSetting.CheckInstallations));

            if (!checkInstallations)
            {
                return;
            }

            var timer = new ExecutionTimer(true);
            var installationSuccess = await InstallationManager.CheckInstallations();

            timer.StopAndWrite();
            if (!installationSuccess.Sucess)
            {
                throw new ArgumentException($"The Installation of the following software failed: {installationSuccess}");
            }
        }