Skip to content

Custom plugin broken: helpers.check_call() doesn't accept shell kwarg #374

@colorfulfool

Description

@colorfulfool

Bug

The Custom plugin is completely non-functional because custom.py passes shell=True to helpers.check_call(), but that function doesn't accept keyword arguments.

custom.py:35:

helpers.check_call(command, shell=True)

helpers.py:31:

def check_call(command, stdout=None) -> int:

This causes a TypeError every time the custom plugin tries to run a script:

TypeError: check_call() got an unexpected keyword argument 'shell'

Fix

Add **kwargs to helpers.check_call():

def check_call(command, stdout=None, **kwargs) -> int:
    try:
        return subprocess.check_call(command, stdout=stdout, **kwargs)
    except FileNotFoundError:
        flatpak_args = base_flatpak_args + command
        return subprocess.check_call(flatpak_args, stdout=stdout, **kwargs)

Environment

  • Yin-Yang v4.0.1
  • Arch Linux, Python 3.14
  • Bug is also present on current main branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions