asty-org / asty

Converts golang AST to JSON and JSON to AST
https://asty-org.github.io/
Apache License 2.0
81 stars 3 forks source link

io: fix stdin,stdout hack #11

Closed xhd2015 closed 1 year ago

xhd2015 commented 1 year ago

When running on MacOS, the following command fails:

asty go2json -input some.go

The message is about having no permission to write to /dev/stdout.

To fix that, simply don't rely on stdout's name. Specifically, don't call os.Create on it

Evgenus commented 1 year ago

Thanks!