holzschu / holzschu/a-shell

Writing to stderr from function called with $() causes script to exit

Open
#863 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

Reproduction script:

~~~sh
#! /bin/sh

foo() {
echo "hello" >&2
echo "world" >&2
echo "blah"
}

s=$(foo)
echo $s
~~~

Expected output:

~~~
hello
world
blah
~~~

a-Shell output:

~~~
hello
~~~

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.