-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix init command and support running Mill without existing
build.sc
I first added an integration test for the init command to reproduce the issues and make sure the feature now works. Instead of failing in case there is no `build.sc`, we continue with an empty setup. Only when we discover an error afterwards, we add a message about the missing `build.sc` to the underlying error message.
- Loading branch information
Showing
4 changed files
with
40 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package mill.integration | ||
package local | ||
import mill.bsp.Constants | ||
import utest._ | ||
|
||
object MillInitTests extends IntegrationTestSuite { | ||
|
||
def tests: Tests = Tests { | ||
test("Mill init works") { | ||
val workspacePath = initWorkspace() | ||
eval("init", "com-lihaoyi/mill-scala-hello.g8", "--name=example") ==> true | ||
val projFile = workspacePath / "example" / "build.sc" | ||
assert(os.exists(projFile)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters