[Rpm-maint] [rpm-software-management/rpm] Rpmlua - missing features (Issue #2095)
mkoncek
notifications at github.com
Tue Jun 14 11:47:16 UTC 2022
Consider the following script:
```lua
print(arg[-1])
print(arg[0])
for k, v in ipairs(arg) do
print(k, v)
end
```
And invoking it:
```
[root at 55eace74b25d javapackages]# rpmlua ./java-utils/java_remove_symbols.lua -- param -p flag
-1 nil
0 nil
1 ./java-utils/java_remove_symbols.lua
2 param
3 -p
4 flag
[root at 55eace74b25d javapackages]# lua ./java-utils/java_remove_symbols.lua -- param -p flag
-1 lua
0 ./java-utils/java_remove_symbols.lua
1 --
2 param
3 -p
4 flag
```
`rpmlua` behaves differently from `lua`, both in using `--` as separator and in numbering the `arg` parameter. I can separate the functions from arg handling code to make it work with both `lua` and `rpmlua` but I see this difference in behaviour as a problem. Although I doubt you are going to change it.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2095#issuecomment-1155076821
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/2095/1155076821 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220614/661bb8fa/attachment-0001.html>
More information about the Rpm-maint
mailing list