cbeust / kobalt

A Kotlin-based build system for the JVM.
Apache License 2.0
432 stars 60 forks source link

Any use of kobaltw partially initializes current directory #469

Closed ruckustboom closed 5 years ago

ruckustboom commented 6 years ago

It appears any use of the kobaltw command partially initializes the current directory as a Kobalt project, including kobaltw --help.

To test, you can create a directory, go into it and run any kobalt command (e.g. kobaltw --help or even just kobaltw*). The directory will then be initialized with the following:

This has been tested on Windows 10 and Fedora 27.

*Note that running kobaltw in an empty directory will do the partial initialization then crash when it can't find a Build.kt file

ethauvin commented 6 years ago

At the very least the behavior is inconsistent.

Note that gradle also create a .gradle directory unless --help, --version, etc. is used.

kobatlw has various behaviors, depending on whether the -- options processing is located in the wrapper, or the app. For example:

kobaltw --version

will only create a kobalt directory containing the wrapper's properties.

I'm pretty sure I can make options like --help and --version create no directories, etc. I'm not entirely convinced that anything else is in need of fixing. @cbeust, thoughts?

As a side note, '--help' does not include --version, because --version is in the wrapper, not the app. That might need fixing too.

cbeust commented 6 years ago

I think nothing should be created if Kobalt can't find a kobalt/src/Build.kt.