Skip to content

Commit

Permalink
Make juvix init non-interactive by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz committed Dec 1, 2024
1 parent dc8d4b7 commit 97d5a78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/Commands/Init.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ init opts = do
when isInteractive (renderStdOutLn @Text "you are all set")
where
isInteractive :: Bool
isInteractive = not (opts ^. initOptionsNonInteractive) && not (opts ^. initOptionsBasic)
isInteractive = opts ^. initOptionsInteractive

checkNotInProject :: forall r. (Members '[EmbedIO, App] r) => Sem r ()
checkNotInProject =
Expand Down
12 changes: 6 additions & 6 deletions app/Commands/Init/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Commands.Init.Options where
import CommonOptions

data InitOptions = InitOptions
{ _initOptionsNonInteractive :: Bool,
{ _initOptionsInteractive :: Bool,
_initOptionsBasic :: Bool
}
deriving stock (Data)
Expand All @@ -12,16 +12,16 @@ makeLenses ''InitOptions

parseInitOptions :: Parser InitOptions
parseInitOptions = do
_initOptionsNonInteractive <-
_initOptionsInteractive <-
switch
( long "non-interactive"
<> short 'n'
<> help "Run non-interactively. Generates a default Package.juvix"
( long "interactive"
<> short 'i'
<> help "Run interactively"
)
_initOptionsBasic <-
switch
( long "basic"
<> short 'b'
<> help "Run non-interactively. Generates a basic Package.juvix that does not depend on the standard library"
<> help "Generate a basic Package.juvix that does not depend on the standard library"
)
pure InitOptions {..}

0 comments on commit 97d5a78

Please sign in to comment.