Skip to content

exec command doesn't strip trailing spaces #521

@TheLQ

Description

@TheLQ

Reproducible for a while, but just tested on freshly built master of WLC and sway

The default firefox.desktop file contains this entry

Exec=firefox %u

When running from dmenu the following command gets sent

i3-msg 'exec "firefox "'

Under i3 this opens firefox. Under sway -v -d this is in the log

Handling command 'exec "firefox "'
find_handler(exec) 0
Executing "firefox "
Child process created with pid 4934
{ "success": true }
IPC Client -1 disconnected
/bin/sh: 1: firefox : not found

Presumably its failing because it's trying to run a binary called firefox instead of firefox. I can't imagine a process where ending or starting spaces not inside quotes are relevant. Even bash strips out spaces

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