RComp init shouldn't assume
cknadler opened this issue · 1 comments
When calling RComp init you shouldn't have to pass it any parameters.
It should behave as follows:
rcomp init
Simply create a .rcomp
config file, in YAML, in the root directory of the project. If one already exists, error out.
rcomp init -e EXECUTABLE_PATH
Should create a .rcomp
config file if one doesn't exist. It should then load the executable: EXECUTABLE_PATH
key value pair into .rcomp
.
If the executable:
key already exists, it should fail unless the -O flag is passed as well.
rcomp init -d TESTS_DIRECTORY_PATH
Should create a .rcomp
config file if one doesn't exist. It should then load the tests_directory: TEST_DIRECTORY_PATH
key value pair into .rcomp
.
If the tests_directory:
already exists, it should fail unless the -O flag is passed as well.
This leads to some extra logic needed before any other command is executed:
rcomp COMMAND_NAME FLAGS OPTIONAL_PARAMETERS
Any command except for init
should check for the existance of the .rcomp
config file, the executable:
key and the tests_directory:
key.
If any of these are not present, rcomp should error out with a message similar to:
run rcomp init before COMMAND_NAME
or
Missing executable path. Run rcomp init -e EXECUTABLE path to set it.