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

Passing --output /dev/stdout results in an error #525

Open
gridbugs opened this issue May 6, 2023 · 1 comment
Open

Passing --output /dev/stdout results in an error #525

gridbugs opened this issue May 6, 2023 · 1 comment

Comments

@gridbugs
Copy link

gridbugs commented May 6, 2023

Describe the bug

Passing /dev/stdout to --output gives the error:

bear: failed with: Events db open failed (file /dev/stdout.events.json): Permission denied

To Reproduce

$ bear --append --output /dev/stdout -- echo
bear: failed with: Events db open failed (file /dev/stdout.events.json): Permission denied

Expected behavior

I would expect setting the output to /dev/stdout would cause bear to write the compilation database to its standard output. Running the command above should print out an empty database ([]).

Environment:

  • OS name: Linux
  • OS version: NixOS (rolling, kernel is Linux 6.3.0)
  • OS architecture: x86_64
  • Bear version: 3.1.2
  • Bear install method: Installed from nixpkgs using nix-shell
@rizsotto
Copy link
Owner

rizsotto commented May 6, 2023

Hey @gridbugs , thanks for this report.

I think you are right, the tool should support IO redirects... Will work on this when I have free time.

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