mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-07 03:22:03 +00:00
Compare commits
No commits in common. "682794046626c152efb614fd55ab75b6e0272d54" and "60edfc00ee77a0e193ae4228786d72e82a79dd32" have entirely different histories.
6827940466
...
60edfc00ee
@ -8,7 +8,6 @@
|
||||
### Fixed
|
||||
- Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else)
|
||||
- Apply environment variables properly after 2.3 shell interpreter changes
|
||||
- hilbish.sink.readAll() function now reads data that doesn't end in a newline
|
||||
|
||||
## [2.3.3] - 2024-11-04
|
||||
### Fixed
|
||||
|
@ -44,7 +44,7 @@ function hilbish.run(cmd, streams)
|
||||
end
|
||||
|
||||
local out = hilbish.snail:run(cmd, {sinks = sinks})
|
||||
local returns = {out.exitCode}
|
||||
local returns = {out}
|
||||
|
||||
if type(streams) == 'boolean' and not streams then
|
||||
table.insert(returns, sinks.out:readAll())
|
||||
|
@ -94,17 +94,11 @@ func luaSinkReadAll(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if s.autoFlush {
|
||||
s.Rw.Flush()
|
||||
}
|
||||
|
||||
lines := []string{}
|
||||
for {
|
||||
line, err := s.Rw.ReadString('\n')
|
||||
if err != nil {
|
||||
if err == io.EOF {
|
||||
// We still want to add the data we read
|
||||
lines = append(lines, line)
|
||||
break
|
||||
}
|
||||
|
||||
@ -233,7 +227,6 @@ func luaSinkAutoFlush(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
||||
func NewSink(rtm *rt.Runtime, Rw io.ReadWriter) *Sink {
|
||||
s := &Sink{
|
||||
Rw: bufio.NewReadWriter(bufio.NewReader(Rw), bufio.NewWriter(Rw)),
|
||||
autoFlush: true,
|
||||
}
|
||||
s.UserData = sinkUserData(rtm, s)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user