Skip to content

Commit

Permalink
Merge pull request #150 from asdil12/plugins
Browse files Browse the repository at this point in the history
Add option to skip plugins
  • Loading branch information
asdil12 authored Sep 25, 2023
2 parents 4835498 + f90ea38 commit 3b38e60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions bin/opi
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ try:
'''),
epilog=textwrap.dedent('''\
Also these queries can be used to install packages from various other vendors:
Also these queries (provided by plugins) can be used to install packages from various other vendors:
''') + pm.get_plugin_string(' ' * 2))

ap.add_argument('query', nargs='*', type=str, help=textwrap.dedent('''\
Expand All @@ -58,6 +58,7 @@ try:
'''))
ap.add_argument('-v', '--version', action='version', version=f'opi version {__version__}')
ap.add_argument('-n', dest='non_interactive', action='store_true', help="Run in non interactive mode")
ap.add_argument('-P', dest='no_plugins', action='store_true', help="Don't run any plugins - only search repos, OBS and Packman")

args = ap.parse_args()

Expand All @@ -72,8 +73,9 @@ try:
print(' or sudo must not require interaction.')
sys.exit(1)

# Try to find a matching plugin for the query (and run it and exit afterwards)
pm.run(args.query[0])
if not args.no_plugins:
# Try to find a matching plugin for the query (and run it and exit afterwards)
pm.run(args.query[0])

binaries = []
binaries.extend(opi.search_published_binary('openSUSE', args.query))
Expand Down
2 changes: 1 addition & 1 deletion opi/plugins/resilio-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class ResilioSync(BasePlugin):
main_query = 'resilio-sync'
description = 'Resilio Sync decentralized file synchronization between devices using the bittorrent protocol'
description = 'Decentralized file synchronization between devices using bittorrent protocol'
queries = ['resilio-sync', 'resilio', 'rslsync']

@classmethod
Expand Down

0 comments on commit 3b38e60

Please sign in to comment.