sync-db icon indicating copy to clipboard operation
sync-db copied to clipboard

Handle the invalid command resulting in infinite loop

Open samirsilwal opened this issue 1 year ago • 4 comments

Changes

  • Check if the command provided to sync-db in valid one

  • Show the available command in case of invalid entry

  • Fixes the infinite loop while unknown command is given to sync-db

Test

Before

DEBUG=* yarn sync-db gg image

After

DEBUG=* yarn sync-db gg

image

samirsilwal avatar Oct 26 '24 08:10 samirsilwal

Resolves https://github.com/leapfrogtechnology/sync-db/issues/242

samirsilwal avatar Oct 26 '24 08:10 samirsilwal

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 35.13%. Comparing base (8322436) to head (c9a1cfb).

Files with missing lines Patch % Lines
src/commands/index.ts 0.00% 5 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #243      +/-   ##
==========================================
- Coverage   35.34%   35.13%   -0.21%     
==========================================
  Files          33       34       +1     
  Lines         863      868       +5     
  Branches      115      116       +1     
==========================================
  Hits          305      305              
- Misses        549      554       +5     
  Partials        9        9              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 26 '24 08:10 codecov[bot]

Will add the tests

samirsilwal avatar Oct 26 '24 08:10 samirsilwal

@samirsilwal Surprised that ocli doesn't have this by default?

mesaugat avatar Oct 20 '25 07:10 mesaugat