-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Can't find the sqlfluff.exe file after installation #133
Comments
Hi @BartWinterCoolblue, the vscode extension does not install sqlFluff on your local, it just use it. Please do have a look at the readme file quote:
|
What if sqlfluff is installed by poetry or in other virtual env in python? Is there a way to have it detect that? |
@aaronclong independently of the how is installed, either local or v. env, when performing cmd such as “which sqlfluff” once installed should recover the path, if still is not found add it to the shell paths:
include the path in which sqlfluff is included into $PATH while also add the executable path in your setting.json from your profile used in vscode. "sqlfluff.executablePath": "/Library/Frameworks/Python.framework/Versions/X.XX/bin/sqlfluff” Not quite follow the issue, maybe adding console error details will help. |
@perlego-maares so their isn't one install of sqlfluff but installed in virtual environment that will change depending on the project/repo. In addition putting the hardcode coded path there makes the config completely unusable for teams/multiple contributors. The suggestion to simply add it to the |
It would be nice if the config could specify a settings.json "sqlfluff.dependencyManager": "poetry",
"sqlfluff.projectRoot": "${workspace}/path" Then the linter provider could spawn a child process and get exec from there. With poetry, you can dynamically fetch the path from this const { exec } = require('child_process');
return new Promise((resolve, reject) => {
exec('poetry run which sqlfluff', (error, stdout, stderr) => {
if (error || stderr) {
reject(error || stderr);
return;
}
resolve(stdout)
});
}); |
@perlego-maares what are your thoughts on the above?^ |
Hi! I just installed the sqfluff extension in VScode. Unfortunately, I got the message that the sqlfluff executable was not found.
'which sqlfluff' is not working and I also don't see the file in any of my repositories. Does anyone how to solve this issue?
The text was updated successfully, but these errors were encountered: