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

Op run does not preserve color #413

Open
ShravanSunder opened this issue Dec 8, 2023 · 5 comments
Open

Op run does not preserve color #413

ShravanSunder opened this issue Dec 8, 2023 · 5 comments
Labels
op-cli Functionality to be implemented in 1Password CLI. Needs to be done by 1Password Developers.

Comments

@ShravanSunder
Copy link

op CLI version

2.22

Goal or desired behavior

I'm running op run with wrangler
op run --env-file='.dev.vars' -- wrangler dev src/worker.ts --port 8888

The colors from wrangler and the formatting of its cli is not preserved

Current behavior

The cli removes color and formatting. Its hard to parse debug information and makes it hard to use 1p cli

Relevant log output

No response

@ShravanSunder ShravanSunder added the op-cli Functionality to be implemented in 1Password CLI. Needs to be done by 1Password Developers. label Dec 8, 2023
@damccull
Copy link

damccull commented Mar 13, 2024

Also experiencing this, but with rust's cargo run and other commands.
Edit: I can pass the --color=always option to cargo to get it to keep color. I imagine this is happening because the pipe into op is not advertising it can accept color or something. Not sure how that works.

@digitalcora
Copy link

This issue appears to be tied to the "masking" feature, since I get color output using op run --no-masking (or when there are no op:// references in the environment, which I guess disables the feature automatically). Of course, if you use this as a workaround, you don't get the benefit of masking.

@ShravanSunder
Copy link
Author

@florisvdg sorry to ping you, i wanted to reach out to someone in 1p team.

Is it possible for someone from 1p to look at this? It makes it hard to use op cli to protect secrets when it changes the behaviour of the commands we need to invoke.

@jferstl
Copy link

jferstl commented Aug 13, 2024

I have the same issue with op run -- docker compose ... where the neatly formatted output by docker is not preserved.

@choccccy
Copy link

This issue appears to be tied to the "masking" feature, since I get color output using op run --no-masking (or when there are no op:// references in the environment, which I guess disables the feature automatically). Of course, if you use this as a workaround, you don't get the benefit of masking.

I also run into this issue, and find that using the --no-masking arg fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
op-cli Functionality to be implemented in 1Password CLI. Needs to be done by 1Password Developers.
Projects
None yet
Development

No branches or pull requests

5 participants