The expected behavior (this is already implemented as the clone command):
The DEM looks for the DEV_ENV_NAME in the local dev_env.json file.
If it can’t find it, an error should be raised and the DEM aborts the execution.
The DEM should check if there is already a Dev Env with the name of NEW_DEV_ENV_NAME.
If the new name has already been taken, the DEM should ask the user to overwrite it:
If yes, overwrite the Dev Env descriptor with the one coming from the DEV_ENV_NAME
If no, abort the execution.
If the name is not taken, then just create a new Dev Env descriptor entry in the local dev_env.json file.
If either the DEV_ENV_NAME or the NEW_DEV_ENV_NAME are empty strings, then the DEM should report an error and abort the execution. (Handled by typer)
The DEM should autocomplete the DEV_ENV_NAME parameter from the list of already available local Dev Envs.
The dem clone command will have a new purpose: it will copy the selected Dev Env descriptor from the catalog and save it in the local dev_env.json.
The new dem cp command should have the same functionality as the current dem clone one, meaning there is no need to modify the command logic.
Documentation: Commands - dem
The expected behavior (this is already implemented as the
clone
command):If it can’t find it, an error should be raised and the DEM aborts the execution.
If the new name has already been taken, the DEM should ask the user to overwrite it: If yes, overwrite the Dev Env descriptor with the one coming from the DEV_ENV_NAME If no, abort the execution. If the name is not taken, then just create a new Dev Env descriptor entry in the local dev_env.json file.