We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run
// build.sc import mill._ import mill.scalalib._ object root extends RootModule with ScalaModule { def scalaVersion = "3.3.1" }
// src/main.scala @main def run = println(s"[app] MY_ENV=${sys.env.get("MY_ENV")}")
Run the following command:
rm -rf out; MY_ENV=hello mill run; mill run
It outputs:
rm -rf out; MY_ENV=hello mill run; mill run [build.sc] [48/52] compile Compiling compiler interface... [info] compiling 1 Scala source to /Users/lorenzo/scala/repro/out/mill-build/compile.dest/classes ... [info] done compiling [35/48] compile [info] compiling 1 Scala source to /Users/lorenzo/scala/repro/out/compile.dest/classes ... [info] done compiling [48/48] run [app] MY_ENV=Some(hello) [48/48] run [app] MY_ENV=Some(hello)
The second time it should output [app] MY_ENV=None
[app] MY_ENV=None
The text was updated successfully, but these errors were encountered:
Fix com-lihaoyi#2881 Avoid propagating server environment
becfb6f
ctx
Fix propagateEnv = false to not propagate env (#238)
7000353
Originated from com-lihaoyi/mill#2881 Pull request: #238
os.SubProcess.env
DynamicVariable
env
Pass env parameter to os.SubProcess.env in MillMain
MillMain
6935115
Fixes com-lihaoyi#2881 since now correct env is used all the time.
99a7347
accb103
lolgab
Successfully merging a pull request may close this issue.
Reproduction
Run the following command:
It outputs:
Expectation
The second time it should output
[app] MY_ENV=None
The text was updated successfully, but these errors were encountered: