mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Add protection to prevent path errors
This commit is contained in:
parent
0af256ba2d
commit
4c84436769
2 changed files with 6 additions and 4 deletions
|
@ -33,16 +33,16 @@
|
|||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path"
|
||||
"en": "Choose a path (for now, only / works)"
|
||||
},
|
||||
"example": "/funkwhale",
|
||||
"default": "/funkwhale"
|
||||
"example": "/",
|
||||
"default": "/"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Should Funkwhale be public accessible?"
|
||||
"en": "Should Funkwhale be publicly accessible?"
|
||||
},
|
||||
"default": "0"
|
||||
},
|
||||
|
|
|
@ -38,6 +38,8 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
|||
# Normalize the url path syntax
|
||||
path_url=$(ynh_normalize_url_path "$path_url")
|
||||
|
||||
test ! "$path_url" != "/" || ynh_die 'The path should be "/" for now...'
|
||||
|
||||
# Check web path availability
|
||||
ynh_webpath_available "$domain" "$path_url"
|
||||
# Register (book) web path
|
||||
|
|
Loading…
Reference in a new issue