soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

`stellar contract alias ls` command outputs info lines to stdout instead of stderr and ignores -q

Open leighmcculloch opened this issue 8 months ago • 0 comments
trafficstars

What version are you using?

22.5.0

What did you do?

Tried to run the contract alias ls command without additional informational output.

First using the -q option:

stellar contract alias ls 2&>/dev/null

Then by redirecting stderr to /dev/null:

stellar contract alias ls 2&>/dev/null

What did you expect to see?

The informational output to be suppressed or not visible.

$ stellar contract alias ls -q
abc: CD27DJQ4P2FXFLYFRUQQ5SSXBOZGMWPYITW7OFCDXO5G32B52KZYZC7T
def: CCUBWUQ6WMU3MTZRM5PQQ62BTTAIQTOGVXDRG4K5LYS6JLRUIM5RHWFI
$ stellar contract alias ls 2&>/dev/null
abc: CD27DJQ4P2FXFLYFRUQQ5SSXBOZGMWPYITW7OFCDXO5G32B52KZYZC7T
def: CCUBWUQ6WMU3MTZRM5PQQ62BTTAIQTOGVXDRG4K5LYS6JLRUIM5RHWFI

What did you see instead?

The informational output was still visible, being written to stdout.

$ stellar contract alias ls -q
ℹ️ Aliases available for network 'Test SDF Network ; September 2015'
abc: CD27DJQ4P2FXFLYFRUQQ5SSXBOZGMWPYITW7OFCDXO5G32B52KZYZC7T
def: CCUBWUQ6WMU3MTZRM5PQQ62BTTAIQTOGVXDRG4K5LYS6JLRUIM5RHWFI
$ stellar contract alias ls 2&>/dev/null
ℹ️ Aliases available for network 'Test SDF Network ; September 2015'
abc: CD27DJQ4P2FXFLYFRUQQ5SSXBOZGMWPYITW7OFCDXO5G32B52KZYZC7T
def: CCUBWUQ6WMU3MTZRM5PQQ62BTTAIQTOGVXDRG4K5LYS6JLRUIM5RHWFI

leighmcculloch avatar Mar 18 '25 03:03 leighmcculloch