Skip to content

Commit

Permalink
Switch to getLiteralStringDef to avoid an unnecessary fromJust
Browse files Browse the repository at this point in the history
  • Loading branch information
josephcsible committed Oct 17, 2023
1 parent 4fd0615 commit 2a95bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ShellCheck/CFG.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ handleCommand cmd vars args literalCmd = do
let
id = getId t
pre = [t]
literal = fromJust $ getLiteralStringExt (const $ Just "\0") t
literal = getLiteralStringDef "\0" t
isKnown = '\0' `notElem` literal
match = fmap head $ variableAssignRegex `matchRegex` literal
name = fromMaybe literal match
Expand Down

0 comments on commit 2a95bc6

Please sign in to comment.