1{ pkgs ? import <nixpkgs> {} }:
3# Make yq work inside whatever `stack test` launches.
4# Nuke this when https://github.com/kislyuk/yq/pull/193 is merged
5# and nixpkgs includes that fix.
8 yq-patch = pkgs.writeText "yq-tty-fix.patch" ''
9diff --git a/yq/__init__.py b/yq/__init__.py
10index d95ac4b..ae7d59e 100644
13@@ -110,7 +110,7 @@ def cli(args=None, input_format="yaml", program_name="yq"):
14 in_place = args.in_place
15 delattr(args, "in_place")
17- if sys.stdin.isatty() and not args.input_streams:
18+ if (sys.stdin is None or sys.stdin.isatty()) and not args.input_streams:
21 elif not args.input_streams:
24pkgs.yq.overrideAttrs (final: old: {
25 patches = old.patches ++ [ yq-patch ];
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list