Expected Behavior
#!/usr/bin/env zx
import {$} from 'zx'
console.log($.sync`echo -e "Item1\nItem2\nItem3"`.lines());
This code should output: [ 'Item1', 'Item2', 'Item3' ]
This is at least the behavior in version 8.1.4.
Actual Behavior
It outputs an array with an empty string: [ '' ]
Steps to Reproduce
- Create a new node project, install
zx and add index.mjs.
// index.mjs
#!/usr/bin/env zx
import {$} from 'zx'
console.log($.sync`echo -e "Item1\nItem2\nItem3"`.lines());
- Make it executable.
chmod +x index.mjs
- Run it with
zx index.mjs
Specifications
- zx version: 8.1.8
- Platform:
windows / macos / linux
- Runtime: node /
deno / bun
Expected Behavior
This code should output:
[ 'Item1', 'Item2', 'Item3' ]This is at least the behavior in version 8.1.4.
Actual Behavior
It outputs an array with an empty string:
[ '' ]Steps to Reproduce
zxand addindex.mjs.chmod +x index.mjszx index.mjsSpecifications
windows/macos/ linuxdeno/bun