Treat 'exec $1' like '$1' for the purpose of quoting (fixes #2068)

This commit is contained in:
Vidar Holen 2020-12-17 20:30:39 -08:00
parent cc3884cf9f
commit bd3299edd3
3 changed files with 5 additions and 2 deletions

View file

@ -422,6 +422,7 @@ getCommandNameAndToken direct t = fromMaybe (Nothing, t) $ do
"busybox" -> firstArg
"builtin" -> firstArg
"command" -> firstArg
"run" -> firstArg -- Used by bats
"exec" -> do
opts <- getBsdOpts "cla:" args
(_, (t, _)) <- listToMaybe $ filter (null . fst) opts