Skip to content

fix: convert Path to string before append in build_tool.lua#301

Open
DevDad-Main wants to merge 1 commit into
rcasia:mainfrom
DevDad-Main:main
Open

fix: convert Path to string before append in build_tool.lua#301
DevDad-Main wants to merge 1 commit into
rcasia:mainfrom
DevDad-Main:main

Conversation

@DevDad-Main
Copy link
Copy Markdown

Problem

Running tests on a Spring/Maven Project crashes with the following error, even after successfully running :NeotestJava setup to install JUnit jar:

Error executing vim.schedule lua callback:
.../neotest-java/lua/neotest-java/build_tool/build_tool.lua:32:
.../neotest-java/lua/neotest-java/model/path.lua:112:
attempt to concatenate a table value

Cause

get_spring_property_filepaths passes a Path object to Path:append(), which expects a string.

Fix

Add :to_string() to convert the Path before appending.

## Problem
Running tests on a Spring/Maven Project crashes with the following
error, even after successfully running `:NeotestJava setup` to install
JUnit jar:

```
Error executing vim.schedule lua callback:
.../neotest-java/lua/neotest-java/build_tool/build_tool.lua:32:
.../neotest-java/lua/neotest-java/model/path.lua:112:
attempt to concatenate a table value
```

### Cause
`get_spring_property_filepaths` passes a `Path` object to
`Path:append()`, which expects a `string`.

### Fix
Add `:to_string()` to convert the Path before appending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant