-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
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
Remove copying env var to .bsp/mill.json #984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Sorry for the bikeshedding below, but I looked way too long at this snippet trying to understand why there is a split.last
.
bsp/src/mill/bsp/BSP.scala
Outdated
"-c", | ||
s"env ${sys.env.map { case (k, v) => s""""$k=$v"""" }.toSeq.mkString(" ")} $millPath -i ${BSP.getClass.getCanonicalName.split("\\$").last}/start" | ||
), | ||
Seq(s"$millPath -i ${BSP.getClass.getCanonicalName.split("\\$").last}/start"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seq(s"$millPath -i ${BSP.getClass.getCanonicalName.split("\\$").last}/start"), | |
Seq(s"$millPath -i ${BSP.getClass.getCanonicalName.split("\\$").head}/start"), |
Although, this is effectively an array of length 1 and both will give the same result, semantically, we want the first part of the split, not the last.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
A run on my own Travis-CI account (https://travis-ci.org/github/lefou/mill/builds/740495671) gave the following error:
Method |
Lol, I don't know why I wrote first. |
Thanks! |
No description provided.