fix(snippet create): allow for stdin
Description
Previous discussion for context: !1614 (comment 2040182399)
Previously the cli would hang if stdin was not passed into glab snippet create
when a path was not passed in. This was fixed in !1580 (merged), but had the adverse side affect of no stdin being able to be passed in at all.
Now with this MR we can pass stdin and also get an error when stdin is required, rather than hanging.
Some small changes to the tests to match the API
How has this been tested?
Screenshots (if appropriate):
scenario | screenshot |
---|---|
no path / no stdin | |
stdin / no path | |
path / no stdin | |
invalid path / no stdin | |
no path / no stdin / no filename |
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Edited by Jay McCure