这是indexloc提供的服务,不要输入任何密码
Skip to content

termux-api command should detect if Termux:API plugin is not installed and print error. #200

@twaik

Description

@twaik

Feature description
You can invoke command like echo $(pm path com.termux.api 2>&1 </dev/null) in termux to get termux:api plugin apk path or get error otherwise, it should be usable to detect plugin installation even without PackageManager API (or JVM).

Background information
Termux:X11 companion package can detect if main APK is installed or not via PackageManager API. Termux:API should do that too.
There are enough people coming to discord, matrix and reddit complaining about termux-api-based commands are hanging indefinitely.

Redirecting everything to /dev/null or anonymous pipes is necessary in command echo $(pm path com.termux.api 2>&1 </dev/null), the same applies to the case if you are porting it to C.

Related to:
#138
#153
#80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions