Coder Social home page Coder Social logo

Comments (7)

ripienaar avatar ripienaar commented on June 11, 2024 1

where --force is supported it will now exit with an error instead of prompting when set

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

I think 0.0.14 behaved the same as you describe 0.0.16 does:

ababfb225a0d:~# nats --version
0.0.14
ababfb225a0d:~# nats str ls
Streams:

        other
ababfb225a0d:~# nats str rm orders -f
? Select a Stream  [Use arrows to move, type to filter]
> other

from jetstream.

tpihl avatar tpihl commented on June 11, 2024

I was fairly sure it didn't ask in 0.0.14, but ok.

So how do i construct a script that removes a stream/consumer/whatever no matter if it exist or not, without it stopping presenting interactive choices?

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

I think when there are no streams it doesn’t ask :)

I can add a flag I guess.

from jetstream.

tpihl avatar tpihl commented on June 11, 2024

would be great. because there can ofc be other streams

from jetstream.

tpihl avatar tpihl commented on June 11, 2024

Thinking about it, i think this is rather important. There should be a flag that prevent the "helping hand" to make sure a script doesn't get stuck. Also, if a command failed, it should return exitcode != 0 (maybe it already does).

This would allow an init container with a bash script to both check if a stream exists ('nats stream info ' would exit with zero to indicate that it already exist) instead of today showing other streamnames.

Or if nats knew if it was run interactively or in script.

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

without a TTY it exits already (though not exactly gracefully) :P

$ echo "nats str rm"|bash
? Select a Stream  [Use arrows to move, type to filter]
> ORDERS
nats: error: could not pick a Stream to operate on: EOF
$ echo $?
1

will add something

from jetstream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.