~kota/gemgen

gemgen: Fix reading from standard input, writing to standard output v1 APPLIED

There is code in `main.go` for reading/writing stdin/out.  However, it
was non-functional.  This was because the code was checking to see if
`opts.Names` was `nil`, when in fact it is a zero-length slice (the only
paths that return `nil` for `opts.Names` are those involving errors, the
version flag, or the help flag).

This feature is currently not
documented anywhere in the help output or man page, and it probably
should be.

If you'd like me to add some documentation for it, or to
bump the version, let me know.

Michelle S (1):
  Fix stdin/stdout not working

 main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.32.0
#684173 .build.yml success
gemgen/patches/.build.yml: SUCCESS in 2m15s

[Fix reading from standard input, writing to standard output][0] from [~alterae][1]

[0]: https://lists.sr.ht/~kota/gemgen/patches/28867
[1]: mailto:alterae@protonmail.com

✓ #684173 SUCCESS gemgen/patches/.build.yml https://builds.sr.ht/~kota/job/684173
Thanks for the fix! I saw your email yesterday and was gonna look into
it, but you beat me to it. I updated the docs and pushed out a new
version with your fix. If you run into any other issues or questions
feel free to drop a message here; there's a number of features I'd still
like to add before a version 1.0.
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kota/gemgen/patches/28867/mbox | git am -3
Learn more about email & git

[PATCH gemgen 1/1] Fix stdin/stdout not working Export this patch

From: Michelle S <alterae@protonmail.com>

`options.ParseArgs` returns [] for opts if no files are specified, not
`nil`.  This commit changes the relevant logic to check for that,
allowing reading from standard input and writing to standard output.
---
 main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.go b/main.go
index 1706531..5a59207 100644
--- a/main.go
+++ b/main.go
@@ -35,7 +35,7 @@ func main() {
	}

	// Use stdin if no filenames were given.
	if opts.Names == nil {
	if len(opts.Names) == 0 {
		err = Convert(os.Stdin, os.Stdout, opts.GemOptions)
		if err != nil {
			log.Fatalf("failed converting STDIN: %v\n", err)
-- 
2.32.0
gemgen/patches/.build.yml: SUCCESS in 2m15s

[Fix reading from standard input, writing to standard output][0] from [~alterae][1]

[0]: https://lists.sr.ht/~kota/gemgen/patches/28867
[1]: mailto:alterae@protonmail.com

✓ #684173 SUCCESS gemgen/patches/.build.yml https://builds.sr.ht/~kota/job/684173
Thanks for the fix! I saw your email yesterday and was gonna look into
it, but you beat me to it. I updated the docs and pushed out a new
version with your fix. If you run into any other issues or questions
feel free to drop a message here; there's a number of features I'd still
like to add before a version 1.0.