mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
action: do not expand env vars in Exec action
...<command> argument (but still resolve tilde). This makes it easier to write sh -c '' constructs without turning labwc into a shell parser in order to expand environment variables, whilst respecting single quotes and escaped characters as well as ignoring subshells syntax like $(foo) and backticks. Also, fix bug where buffer length+alloc get out-of-sync
This commit is contained in:
parent
c6c1f8e04b
commit
881d788bee
6 changed files with 44 additions and 12 deletions
|
|
@ -564,7 +564,7 @@ actions_run(struct view *activator, struct server *server,
|
|||
struct buf cmd;
|
||||
buf_init(&cmd);
|
||||
buf_add(&cmd, action_str_from_arg(arg));
|
||||
buf_expand_shell_variables(&cmd);
|
||||
buf_expand_tilde(&cmd);
|
||||
spawn_async_no_shell(cmd.buf);
|
||||
free(cmd.buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue