Skip to content

apt-get update: osh -c -- echo hi: Command '--' not found #2637

@btertoolen

Description

@btertoolen

Ran into this while working on regtest/debian.

apt or one of its hooks seems to invoke the system shell with -c -- before the actual commands that should be executed. But osh tries to execute -- as a command instead of treating it like an argument delimiter.

Here is the full command that is executed: [pid 21762] execve("/bin/sh", ["sh", "-c", "--", "dpkg-source --no-check -x hello_"...], 0x7ffe5af89d28 /* 19 vars */) = 0

Or a minimal reproducable example:

$ osh -c -- echo hi
Unexpected error in execvpe('--', ['--'], ...): [Errno 2] No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions