-
Notifications
You must be signed in to change notification settings - Fork 52
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
Password JSON output is cut off when using CLI with Nodejs #235
Comments
Hello, Thanks for reporting this issue, I'll spend time on it next week when I'm back. |
Hello, So I have spent quite some times deep diving this issue. I know what line to blame between the two commits. program
.parseAsync()
.catch((error: Error) => {
console.error(errorColor(`error: ${error.message}`));
process.exit(1);
})
.finally(() => process.exit(0)); // <-- here The reason I added this is to make sure the program exit once the command is run, that way any potential thread hanging in the background is closed. Took me a while to figure out, but using There are a couple of issues mentioning this:
What I've come around is to write an empty buffer to the stdout and use the callback function to exit once it's done, this will force to wait for the previous write+flush to end and then it can exit. process.stdout.write('', 'utf-8', () => process.exit(0)) I know it feels like a monkey patch but it's the best I could come up with for now. |
Patched in v6.2416.0 |
Hi @Mikescops, thank you very much. With the new version the issue is fixed! |
Describe the bug
Since the new feature "user presence verification with biometrics" (#231) was introduced, you can not fetch the complete output from the CLI via Nodejs, if a lot of passwords are stored.
For getting all passwords (
dcli p --output json
) withchildProcess.execFile()
you would have to use themaxBuffer
option. Otherwise the printed output of the JSON is cut off after 8190 characters.With the commit e16b137 everything works, but with the next commit 0507f57 it seems that
maxBuffer
is ignored.To Reproduce
Steps to reproduce the behavior:
length
Expected behavior
I would expect, that maxBuffer has an effect and can be used to get to full stdout.
Environment (please complete the following information):
Additional context
The new feature was discussed in raycast/extensions#11326.
The text was updated successfully, but these errors were encountered: