Skip to content

Commit

Permalink
fix: can't return luaL_error in check_open_window()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Oct 13, 2024
1 parent 24d19a1 commit 888c56b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout
Expand All @@ -40,8 +40,8 @@ jobs:
- name: Run clang-format on C files and headers
run: |
# "notify" me of newer clang-format version
if command -v clang-format-19 &> /dev/null; then
echo "clang-format-19 is available"
if command -v clang-format-16 &> /dev/null; then
echo "clang-format-16 is available"
exit 2
fi
Expand All @@ -51,16 +51,16 @@ jobs:
echo "No files found"
exit 1
fi
clang-format-18 --verbose --dry-run --Werror "${files[@]}"
clang-format-15 --verbose --dry-run --Werror "${files[@]}"
- name: Set up Lua
uses: leafo/gh-actions-lua@35bcb06abec04ec87df82e08caa84d545348536e # v10.0.0

- name: Run clang-tidy on C files and headers
run: |
# "notify" me of newer clang-tidy version
if command -v clang-tidy-19 &> /dev/null; then
echo "clang-tidy-19 is available"
if command -v clang-tidy-16 &> /dev/null; then
echo "clang-tidy-16 is available"
exit 2
fi
Expand All @@ -70,7 +70,7 @@ jobs:
echo "No files found"
exit 1
fi
clang-tidy-18 --extra-arg="-I.lua/include" --warnings-as-errors="*" "${files[@]}"
clang-tidy-15 --extra-arg="-I.lua/include" --warnings-as-errors="*" "${files[@]}"
- name: Set up LuaRocks
uses: hishamhm/gh-actions-luarocks@master
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-22.04, windows-latest, macos-latest ]
lua_version: [ '5.1', '5.2', '5.3', '5.4', 'luajit' ]
runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int lfenster_rgb(lua_State *L) {
static window *check_open_window(lua_State *L) {
window *p_window = check_window(L);
if (is_window_closed(p_window)) {
return luaL_error(L, "attempt to use a closed window");
luaL_error(L, "attempt to use a closed window");
}
return p_window;
}
Expand Down

0 comments on commit 888c56b

Please sign in to comment.