mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-28 00:07:03 +08:00
Merge pull request #1827 from josephcsible/nofromjust2
Remove more unnecessary uses of fromJust
This commit is contained in:
@@ -2056,7 +2056,7 @@ readSimpleCommand = called "simple command" $ do
|
||||
firstArgument <- ignoreProblemsOf . optionMaybe . try . lookAhead $ readCmdWord
|
||||
suffix <- option [] $ getParser readCmdSuffix
|
||||
-- If `export` or other modifier commands are called with `builtin` we have to look at the first argument
|
||||
(if isCommand ["builtin"] cmd && isJust firstArgument then fromJust firstArgument else cmd) [
|
||||
(if isCommand ["builtin"] cmd then fromMaybe cmd firstArgument else cmd) [
|
||||
(["declare", "export", "local", "readonly", "typeset"], readModifierSuffix),
|
||||
(["time"], readTimeSuffix),
|
||||
(["let"], readLetSuffix),
|
||||
|
Reference in New Issue
Block a user