[Rpm-maint] [rpm-software-management/rpm] Make interactive Lua mode actually interactive (#1632)
Panu Matilainen
notifications at github.com
Mon Apr 12 12:04:00 UTC 2021
Refuse to run rpm.interactive() unless running from tty as a minimal requisite.
Make the interactive loop print results immediately instead of process exist, eg
```
$ ./rpm --eval "%{lua:rpm.interactive()}"
RPM Interactive Lua 5.4 Interpreter
> print(macros['_libdir'])
/usr/lib64
> a=5
> print(a)
5
> =rpm.vercmp('1.0-1', '2.0-1')
-1
```
'=' being an undocumented shorthand for print().
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/1632
-- Commit Summary --
* Require stdin and stdout to be tty's for rpm.interactive()
* Print output immediately in rpm.interactive()
-- File Changes --
M rpmio/rpmlua.c (10)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/1632.patch
https://github.com/rpm-software-management/rpm/pull/1632.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1632
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210412/0689fa7a/attachment.html>
More information about the Rpm-maint
mailing list