File tree Expand file tree Collapse file tree
check-load-dot-env-filename-changed Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version := " 0.1"
2+
3+ ThisBuild / envFileName := " dotenv"
4+
5+ TaskKey [Unit ](" check" ) := {
6+ val lastLog : File = BuiltinCommands .lastLogFile(state.value).get
7+ val last : String = IO .read(lastLog)
8+ val contains = last.contains(" Configured .env environment" )
9+ if (! contains)
10+ sys.error(" expected log message" )
11+ if (sys.env.get(" LINE_ONE" ).isEmpty || sys.env.get(" LINE_TWO" ).isEmpty)
12+ sys.error(" environment variables not set" )
13+ }
Original file line number Diff line number Diff line change 1+ LINE_ONE=abc
2+ LINE_TWO=xyz
Original file line number Diff line number Diff line change 1+ sys.props.get(" plugin.version" ) match {
2+ case Some (x) => addSbtPlugin(" nl.gn0s1s" %% " sbt-dotenv" % x)
3+ case _ =>
4+ sys.error(
5+ """ |The system property 'plugin.version' is not defined.
6+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin
7+ )
8+ }
Original file line number Diff line number Diff line change 1+ > check
Original file line number Diff line number Diff line change 1+ LINE_ONE = abc
2+ LINE_TWO = xyz
Original file line number Diff line number Diff line change 1+ version := " 0.1"
2+
3+ TaskKey [Unit ](" check" ) := {
4+ val lastLog : File = BuiltinCommands .lastLogFile(state.value).get
5+ val last : String = IO .read(lastLog)
6+ val contains = last.contains(" Configured .env environment" )
7+ if (! contains)
8+ sys.error(" expected log message" )
9+ if (sys.env.get(" LINE_ONE" ).isEmpty || sys.env.get(" LINE_TWO" ).isEmpty)
10+ sys.error(" environment variables not set" )
11+ }
Original file line number Diff line number Diff line change 1+ sys.props.get(" plugin.version" ) match {
2+ case Some (x) => addSbtPlugin(" nl.gn0s1s" %% " sbt-dotenv" % x)
3+ case _ =>
4+ sys.error(
5+ """ |The system property 'plugin.version' is not defined.
6+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin
7+ )
8+ }
Original file line number Diff line number Diff line change 1+ > check
Original file line number Diff line number Diff line change 1+ version := " 0.1"
2+
3+ TaskKey [Unit ](" check" ) := {
4+ val lastLog : File = BuiltinCommands .lastLogFile(state.value).get
5+ val last : String = IO .read(lastLog)
6+ val contains = last.contains(
7+ " .env file not found (fileName=.env), no .env environment configured."
8+ )
9+ if (! contains)
10+ sys.error(" expected log message" )
11+ }
Original file line number Diff line number Diff line change 1+ sys.props.get(" plugin.version" ) match {
2+ case Some (x) => addSbtPlugin(" nl.gn0s1s" %% " sbt-dotenv" % x)
3+ case _ =>
4+ sys.error(
5+ """ |The system property 'plugin.version' is not defined.
6+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin
7+ )
8+ }
You can’t perform that action at this time.
0 commit comments