Skip to content

Commit 76cdecd

Browse files
committed
Address PR feedback: use stdin:nofilepath and remove redundant note
1 parent bc86e79 commit 76cdecd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ext-common/Ext/ElmFormat.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ format filePath text = do
3939

4040
formatOrPassthrough :: Text -> Text
4141
formatOrPassthrough text = do
42-
case format "stdin" text of
42+
case format "stdin:nofilepath" text of
4343
Right formatted -> formatted
4444
Left _ -> text
4545

extra/Lamdera/CLI/Format.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ run inputs flags =
121121
TIO.putStrLn " --yes Reply 'yes' to all automated prompts."
122122
TIO.putStrLn " --validate Check if files are formatted without changing them."
123123
TIO.putStrLn " --stdin Read from stdin, output to stdout.\n"
124-
TIO.putStrLn "Note: All flags must use double dashes (--flag). Single dashes (-flag) are not supported.\n"
125124
TIO.putStrLn "Examples:"
126125
TIO.putStrLn " lamdera format Main.elm # formats Main.elm"
127126
TIO.putStrLn " lamdera format Main.elm --output Main2.elm # formats Main.elm as Main2.elm"
@@ -166,7 +165,7 @@ expandPath path = do
166165

167166
formatText :: Format -> T.Text -> IO ()
168167
formatText flags input =
169-
case ElmFormat.format "stdin" input of
168+
case ElmFormat.format "stdin:nofilepath" input of
170169
Right formatted ->
171170
TIO.putStr formatted
172171
Left err ->

0 commit comments

Comments
 (0)