Commit graph

17 commits

Author SHA1 Message Date
Maniack Crudelis
0ad8daa6ae
Remove escape character in getopts 2019-07-21 18:35:19 +02:00
Maniack Crudelis
3a8d312ed2
[fix] Fix values starting by - in getopts 2019-07-09 20:06:16 +02:00
Maniack Crudelis
8b8df94bef
Keep useful comments...
We still use eval, comment about its usage is still relevant...
2019-03-28 19:37:23 +01:00
Gabriel Corona
84c66990c3 Avoid having to shell-escape arguments in ynh_handle_getopts_args
Fixes $ ` and \ injections.
2019-03-25 19:09:00 +01:00
Maniack Crudelis
ebaa16da3d
Merge pull request #683 from YunoHost/fix_getopts
Escape $ in getopts
2019-03-25 13:51:20 +01:00
Maniack Crudelis
652edc204c
Syntax fix 2019-03-16 16:53:07 +01:00
Maniack Crudelis
ad748a75f6
eval is useful and working before being evil... 2019-03-16 16:15:54 +01:00
Maniack Crudelis
23d7a0005d
Escape $ in getopts 2019-03-16 16:05:32 +01:00
Maniack Crudelis
873bf4ae37 Add min version for all helpers 2019-02-25 18:44:21 +01:00
Maniack Crudelis
573fab4268
[fix] Escape double quote before eval in getopts
Work in progress...
Need to be tested.
2019-02-10 21:23:56 +01:00
Maniack Crudelis
540291a7e0 Ignore useless parameters in legacy mode 2019-01-04 19:26:54 +01:00
Maniack Crudelis
50f3291ea7 Fix getopts with blank argument's value
There's no reason in that loop where we're looking for values of an option to have a blank cell in the array of arguments. Unless for an option with a missing value.
In that case, it's better to ignore this condition and store a blank value in the variable.
Otherwise, in case of missing value for an option, with this condition, we enter in an infinite loop, because the shift will stay at 0.
2019-01-04 18:44:40 +01:00
Maniack Crudelis
976f160afb Fix getopts and its legacy mode 2019-01-04 17:11:49 +01:00
Maniack Crudelis
4bac17a162
Merge branch 'stretch-unstable' into use_getops 2018-12-29 19:07:25 +01:00
Maniack Crudelis
2094557e1e
Use getopts helpers in getopts itself 2018-12-29 18:51:49 +01:00
Maniack Crudelis
e918836ab0 Fix multiple value for getopts (#592) 2018-12-01 16:21:31 +01:00
Maniack Crudelis
45ad53eb43
Add the internal helper ynh_handle_getopts_args 2018-08-27 21:44:22 +02:00