From 8720a172861f5004318725edebc7a54c3efc560d Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 27 Apr 2026 18:33:08 +0200 Subject: [PATCH 1/5] CI: fix immediate crash --- .github/workflows/test.yml | 4 ++-- src/utils.c | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca318e3..be8977a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,8 +22,8 @@ jobs: pkg-config \ libcjson-dev \ libncurses-dev \ - git - + git \ + neovim - name: Build run: make diff --git a/src/utils.c b/src/utils.c index 28c7316..c473bb1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,6 @@ #include "utils.h" +#include "unistd.h" +#include const char *supportedEditor[] = {"helix", "jed", "kakoune", "micro", "nano", "neovim", "vi", "vim"}; const int numEditors = 8; @@ -112,17 +114,25 @@ static void ensureDir(const char *path, const int shouldDebug) { } void initAppFilesAndDirs(const char *home, const int shouldDebug) { + // sometimes .cache and .config doesn't exist. Such as with github actions machines char config_dir[PATH_MAX]; char cache_dir[PATH_MAX]; - + snprintf(config_dir, sizeof(config_dir), - "%s/.config/notewrapper", home); + "%s/.config/", home); snprintf(cache_dir, sizeof(cache_dir), - "%s/.cache/notewrapper", home); + "%s/.cache/", home); + + ensureDir(config_dir, shouldDebug); + ensureDir(cache_dir, shouldDebug); + + strncat(config_dir, "notewrapper/", PATH_MAX); + strncat(cache_dir, "notewrapper/", PATH_MAX); ensureDir(config_dir, shouldDebug); ensureDir(cache_dir, shouldDebug); + char config_file[PATH_MAX+12]; snprintf(config_file, sizeof(config_file), "%s/config.json", config_dir); From 0b2c499bd1cd13a2e99b343cbbf0ae096dbf6db5 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 27 Apr 2026 18:34:36 +0200 Subject: [PATCH 2/5] CI: remove on push testing --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be8977a..6d40034 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,8 +1,6 @@ name: test on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] From 027038e49efcd37a3755e7cf09354c5eea9bf5f4 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 27 Apr 2026 18:47:45 +0200 Subject: [PATCH 3/5] Fix: removed headers clangd added --- src/utils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index c473bb1..0b82319 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,6 +1,4 @@ #include "utils.h" -#include "unistd.h" -#include const char *supportedEditor[] = {"helix", "jed", "kakoune", "micro", "nano", "neovim", "vi", "vim"}; const int numEditors = 8; From a839b0da5b094ffc4f317459bfd91b1af31d2603 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 27 Apr 2026 18:52:01 +0200 Subject: [PATCH 4/5] CI: fix terminal: unknown --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d40034..584d53d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,4 +26,6 @@ jobs: run: make - name: Run tests - run: make test + run: | + export TERM=xterm + make test From feadf626320e51a39703af9ac65b7f9a5ffdd3e1 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Mon, 27 Apr 2026 18:55:03 +0200 Subject: [PATCH 5/5] CI: fix no ~/Documents/Notes --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 584d53d..c24b0b8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,8 @@ jobs: libncurses-dev \ git \ neovim + - name: Prepare environnement + run: mkdir -p ~/Documents/Notes - name: Build run: make