From 77ea1ffb335171974079794c693aa06b01ad770d Mon Sep 17 00:00:00 2001 From: StelStelox Date: Thu, 17 Jul 2025 17:57:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D1=8E=20ubuntu=20=D0=B8=20=D1=81?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4?= =?UTF-8?q?=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20exit=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D1=86=D0=B5=D1=81=D1=81=20=D0=B0=20=D0=BD=D0=B5=20=D1=87=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=20panic!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 2 +- src/core/config.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 257be68..b6d970f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: include: - - os: ubuntu-latest + - os: ubuntu-22.04 fileName: "sw_linux_x64" file: "sw" - os: windows-latest diff --git a/src/core/config.rs b/src/core/config.rs index 6363b96..5318d22 100644 --- a/src/core/config.rs +++ b/src/core/config.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; use serde_json; -use std::fs; +use std::{fs, process::exit}; pub fn get_config() -> Settings { let config = { @@ -21,7 +21,8 @@ pub fn get_config() -> Settings { serde_json::to_string_pretty(&config).unwrap(), ) .expect("Can't write to file"); - panic!("Config not found, a default config was created. \nPlease configure it."); + println!("Config not found, a default config was created. \nPlease configure it."); + exit(1); } }; serde_json::from_str::(&s).unwrap()