Write config if it doesn't exist.
the build was successful Details

This commit is contained in:
tastytea 2019-02-08 01:42:37 +01:00
parent 066fda27a6
commit cf5f9bcca0
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 2 additions and 5 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2) cmake_minimum_required (VERSION 3.2)
project(compilescript project(compilescript
VERSION 0.3.3 VERSION 0.3.4
LANGUAGES CXX LANGUAGES CXX
) )

View File

@ -50,10 +50,7 @@ bool read_settings()
{ {
bool need_save = false; bool need_save = false;
xdgcfg config("compilescript.cfg"); xdgcfg config("compilescript.cfg");
if (config.read() != 0) config.read();
{
return false;
}
libconfig::Setting &cfg = config.get_cfg().getRoot(); libconfig::Setting &cfg = config.get_cfg().getRoot();
if (cfg.exists("compiler")) if (cfg.exists("compiler"))