mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Fixes /o\
This commit is contained in:
parent
395bab657a
commit
5e821aee23
1 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ _INSTALL_APP () {
|
||||||
value="$(echo $arg_override | cut -d '=' -f 2-)"
|
value="$(echo $arg_override | cut -d '=' -f 2-)"
|
||||||
|
|
||||||
# (Legacy stuff ... We don't override is_public if its type is not boolean)
|
# (Legacy stuff ... We don't override is_public if its type is not boolean)
|
||||||
[[ -e $package_path/manifest.json ]] \
|
[[ -e $package_path/manifest.json ]] \
|
||||||
&& [[ "$key" == "is_public" ]] \
|
&& [[ "$key" == "is_public" ]] \
|
||||||
&& [[ "$(jq -r '.arguments.install[] | select(.name=="is_public") | .type' $package_path/manifest.json)" != "boolean" ]] \
|
&& [[ "$(jq -r '.arguments.install[] | select(.name=="is_public") | .type' $package_path/manifest.json)" != "boolean" ]] \
|
||||||
&& continue
|
&& continue
|
||||||
|
@ -110,7 +110,7 @@ _INSTALL_APP () {
|
||||||
then
|
then
|
||||||
local default_value=$(jq -e -r --arg ARG $ARG '.arguments.install[] | select(.name==$ARG) | .default' $package_path/manifest.json)
|
local default_value=$(jq -e -r --arg ARG $ARG '.arguments.install[] | select(.name==$ARG) | .default' $package_path/manifest.json)
|
||||||
else
|
else
|
||||||
local default_value=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); d = t['install']['$ARG'].get('default'); assert d is not None, 'Missing default value'; print(d)" < manifest.toml)
|
local default_value=$(python3 -c "import toml, sys; t = toml.loads(sys.stdin.read()); d = t['install']['$ARG'].get('default'); assert d is not None, 'Missing default value'; print(d)" < $package_path/manifest.toml)
|
||||||
fi
|
fi
|
||||||
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
[[ $? -eq 0 ]] || { log_error "Missing install arg $ARG ?"; return 1; }
|
||||||
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
[[ ${install_args: -1} == '&' ]] || install_args+="&"
|
||||||
|
@ -195,7 +195,7 @@ _VALIDATE_THAT_APP_CAN_BE_ACCESSED () {
|
||||||
then
|
then
|
||||||
local has_public_arg=$([[ -n "$(jq -r '.arguments.install[] | select(.name=="is_public")' $package_path/manifest.json)" ]] && echo true || echo false)
|
local has_public_arg=$([[ -n "$(jq -r '.arguments.install[] | select(.name=="is_public")' $package_path/manifest.json)" ]] && echo true || echo false)
|
||||||
else
|
else
|
||||||
local has_public_arg=$(grep -q '\[install.init_main_permission\]' manifest.toml && echo true || echo false)
|
local has_public_arg=$(grep -q '\[install.init_main_permission\]' $package_path/manifest.toml && echo true || echo false)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$install_type" != 'private' ] && [[ $has_public_arg == "false" ]]
|
if [ "$install_type" != 'private' ] && [[ $has_public_arg == "false" ]]
|
||||||
|
|
Loading…
Add table
Reference in a new issue