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

vale sync failed to look for config file #798

Closed
1 task done
ccoVeille opened this issue Mar 25, 2024 · 0 comments
Closed
1 task done

vale sync failed to look for config file #798

ccoVeille opened this issue Mar 25, 2024 · 0 comments

Comments

@ccoVeille
Copy link
Contributor

ccoVeille commented Mar 25, 2024

Check for existing issues

  • Completed

Environment

Linux via Homebrew

$ vale --version
vale version 3.3.1

Describe the bug / provide steps to reproduce it

Here is my conf

$ vale ls-dirs
Asset       | Default Location                               | Found
StylesPath  | /home/whatever/.local/share/vale/styles        | ✓
.vale.ini   | /home/whatever/.config/vale/.vale.ini          | ✓
vale-native | /home/whatever/.config/vale/native/vale-native |
$ cat ~/.config/vale/.vale.ini   

MinAlertLevel = suggestion

Packages = write-good

[*]
BasedOnStyles = Vale, write-good

vale works

$ vale /etc/debian_version
✔ 0 errors, 0 warnings and 0 suggestions in 1 file.

But you cannot use vale sync without using --config

$ vale sync
E100 [.vale.ini not found] Runtime error

no config file found

Execution stopped with code 1.

And it works when asking to use the config file reported with vale ls-dirs

$ vale sync --config ~/.config/vale/.vale.ini
Syncing write-good [1/1] █████████████████████████████████████████████ 100% | 0s
SUCCESS  Synced 1 package(s) to '/home/whatever/.local/share/vale/styles'.

Expected behavior, be able to use vale sync without having to use a --config parameter

Here is an strace of what the code tries to locate

newfstatat(AT_FDCWD, "/home/whatever/Documents/dev/.vale", 0xc002d9a1d8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/dev/_vale", 0xc002d9a2a8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/dev/vale.ini", 0xc002d9a378, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/dev/.vale.ini", 0xc002d9a448, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/dev/_vale.ini", 0xc002d9a518, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/.vale", 0xc002d9a5e8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/_vale", 0xc002d9a6b8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/vale.ini", 0xc002d9a788, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/.vale.ini", 0xc002d9a858, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/Documents/_vale.ini", 0xc002d9a928, 0) = -1 ENOENT (No such file or directory)
(...)
newfstatat(AT_FDCWD, "/home/whatever/.vale", 0xc002d9b628, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/_vale", 0xc002d9b6f8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/vale.ini", 0xc002d9b7c8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/.vale.ini", 0xc002d9b898, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/_vale.ini", 0xc002d9b968, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/whatever/.config/vale", {st_mode=S_IFDIR|0700, st_size=4096, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/whatever/.config/vale/.vale.ini", {st_mode=S_IFREG|0664, st_size=107, ...}, 0) = 0

You can see it find the /home/whatever/.config/vale/.vale.ini file, but it reports an error

@ccoVeille ccoVeille changed the title vale sync vale sync failed to look for config file Mar 25, 2024
@jdkato jdkato closed this as completed Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants