Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert paths to strings before concatenating #602

Merged
merged 2 commits into from
May 31, 2024
Merged

Conversation

ridulfo
Copy link
Contributor

@ridulfo ridulfo commented May 27, 2024

Description

When renaming a note, paths are logged. These paths are table values and cannot be concatenated without first being converted to strings.

How to test

Simply run :ObsidianRename new-name --dry-run

These errors should not appear anymore:

Do you want to continue? [Y/n] Error executing Lua callback: ...nvim/lazy/obsidian.nvim/lua/obsidian/commands/rename.lua:157: attempt to concatenate local 'ne
w_note_path' (a table value)
stack traceback:
        ...nvim/lazy/obsidian.nvim/lua/obsidian/commands/rename.lua:157: in function 'func'
        ...e/nvim/lazy/obsidian.nvim/lua/obsidian/commands/init.lua:68: in function <...e/nvim/lazy/obsidian.nvim/lua/obsidian/commands/init.lua:67>

PS: This is my first PR in Lua, I am gladly open for improvements.

@ridulfo ridulfo marked this pull request as draft May 27, 2024 07:05
@ridulfo ridulfo marked this pull request as ready for review May 27, 2024 07:12
Copy link
Owner

@epwalsh epwalsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ridulfo! LGTM

@epwalsh epwalsh merged commit d136011 into epwalsh:main May 31, 2024
7 checks passed
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.

2 participants