Commit e8ad6278 authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

bugfix: prevent from "Cloning into 'None'..."

parent cf0ced2e
......@@ -8,7 +8,7 @@ from diva_evaluation_cli.bin.private_src.implementation.utils.actev_cli_environm
from diva_evaluation_cli.bin.private_src.implementation.get_system.system_types_definition import system_types
def entry_point(url, system_type, location=None, user=None, password=None, token=None, install_cli=False, name=False, sha=None):
def entry_point(url, system_type, location=None, user=None, password=None, token=None, install_cli=False, sha=None, name=False):
"""Private entry point.
Downloads a credentialed, web-accessible content into src
......@@ -63,13 +63,15 @@ def entry_point(url, system_type, location=None, user=None, password=None, token
install_cli = "True"
else:
install_cli = "False"
if not name:
name = "None"
# SHA
if not sha:
sha = "None"
if not name:
name = ""
# go into the right directory to execute the script
path = os.path.dirname(__file__)
script = os.path.join(path, '../implementation/get_system/get/' + script)
......@@ -79,8 +81,8 @@ def entry_point(url, system_type, location=None, user=None, password=None, token
" " + password + \
" " + token + \
" " + install_cli + \
" " + name + \
" " + sha
" " + sha + \
" " + name
# execute the script
# status is the exit status code returned by the program
......
......@@ -6,8 +6,8 @@ user=$3
password=$4
token=$5
cli=$6
name=$7
sha=$8
sha=$7
name=$8
# If there are credentials
# Replace '@' by its hexa character to clean the fields to avoid confusion with the '@' delimiter
......@@ -33,10 +33,6 @@ if [ $location != "None" ];then
cd $location
fi
if [ $name == "None"];then
name=""
fi
git clone --recursive $url $name
if [ $? -eq 0 ];then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment