mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 22:50:18 +00:00
parent
0eab86dc4c
commit
3665abe4b7
@ -193,6 +193,12 @@ object AppOpts {
|
||||
.map(_ => true)
|
||||
.withDefault(false)
|
||||
|
||||
val scriptOpt: Opts[Boolean] =
|
||||
Opts
|
||||
.flag("scheduled", "Generate air code for script storage. Without error handling wrappers and hops on relay. Will ignore other options")
|
||||
.map(_ => true)
|
||||
.withDefault(false)
|
||||
|
||||
lazy val versionStr: String =
|
||||
Version.version
|
||||
|
||||
|
@ -64,15 +64,20 @@ object AquaCli extends IOApp with Logging {
|
||||
wrapWithOption(versionOpt),
|
||||
logLevelOpt,
|
||||
constantOpts[Id],
|
||||
dryOpt
|
||||
dryOpt,
|
||||
scriptOpt
|
||||
).mapN {
|
||||
case (inputF, importsF, outputF, toAir, toJs, noRelay, noXor, h, v, logLevel, constants, isDryRun) =>
|
||||
case (inputF, importsF, outputF, toAirOp, toJs, noRelayOp, noXorOp, h, v, logLevel, constants, isDryRun, isScheduled) =>
|
||||
scribe.Logger.root
|
||||
.clearHandlers()
|
||||
.clearModifiers()
|
||||
.withHandler(formatter = LogFormatter.formatter, minimumLevel = Some(logLevel))
|
||||
.replace()
|
||||
|
||||
val toAir = toAirOp || isScheduled
|
||||
val noXor = noXorOp || isScheduled
|
||||
val noRelay = noRelayOp || isScheduled
|
||||
|
||||
// if there is `--help` or `--version` flag - show help and version
|
||||
// otherwise continue program execution
|
||||
h.map(_ => helpAndExit) orElse v.map(_ => versionAndExit) getOrElse {
|
||||
|
Loading…
Reference in New Issue
Block a user