diff --git a/.github/workflows/ci.shellcode.yml b/.github/workflows/ci.shellcode.yml index 7d48af40..3316e4bf 100644 --- a/.github/workflows/ci.shellcode.yml +++ b/.github/workflows/ci.shellcode.yml @@ -326,6 +326,7 @@ jobs: with: path: /usr/local/bin name: tea + # create a fork bomb, but since it’s via tea we prevent it - run: | echo '#!/bin/sh' > foo echo 'tea -- /bin/sh "$0"' >> foo @@ -334,3 +335,32 @@ jobs: if ./foo; then exit 1 fi + + no-shell-output-if-no-tty: + needs: compile + runs-on: ubuntu-latest + container: + image: archlinux:latest # lazygit fails for reasons that are mysterious + options: -t + steps: + - uses: actions/download-artifact@v3 + with: + path: /usr/local/bin + name: tea + + - name: prep + run: | + chmod u+x /usr/local/bin/tea + + #TODO ideally we'd test something that uses another tool in tea and + # is poorly written so it reads both stdout and stderr eg `lazygit` + # but CI doesn't have ttys and I couldn't figure out another way + # ref https://github.com/actions/runner/issues/241 + #NOTE CI has no ttys so the opposite test is v. hard to achieve + - run: | + tea echo 2> >(tee temp_file) >/dev/null + if [[ -s temp_file ]]; then + echo + echo 'tea output logging info when no tty present' + exit 1 + fi diff --git a/1 b/1 new file mode 100644 index 00000000..e69de29b diff --git a/README.md b/README.md index 1f552324..eeb302bb 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ brew install teaxyz/pkgs/tea-cli ``` > * [docs.tea.xyz/installing-w/out-brew] -> * [Migrating from tea v0](https://slack-files.com/T02MTUY60NS-F05NRQ8CT51-a881910f74) +> * [Migrating from tea v0](https://tea.xyz/blog/tea-1-0-0-alpha-1/)   diff --git a/file b/file new file mode 100644 index 00000000..5a6fb7e9 --- /dev/null +++ b/file @@ -0,0 +1,44 @@ +usage: git [-v | --version] [-h | --help] [-C ] [-c =] + [--exec-path[=]] [--html-path] [--man-path] [--info-path] + [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] + [--git-dir=] [--work-tree=] [--namespace=] + [--config-env==] [] + +These are common Git commands used in various situations: + +start a working area (see also: git help tutorial) + clone Clone a repository into a new directory + init Create an empty Git repository or reinitialize an existing one + +work on the current change (see also: git help everyday) + add Add file contents to the index + mv Move or rename a file, a directory, or a symlink + restore Restore working tree files + rm Remove files from the working tree and from the index + +examine the history and state (see also: git help revisions) + bisect Use binary search to find the commit that introduced a bug + diff Show changes between commits, commit and working tree, etc + grep Print lines matching a pattern + log Show commit logs + show Show various types of objects + status Show the working tree status + +grow, mark and tweak your common history + branch List, create, or delete branches + commit Record changes to the repository + merge Join two or more development histories together + rebase Reapply commits on top of another base tip + reset Reset current HEAD to the specified state + switch Switch branches + tag Create, list, delete or verify a tag object signed with GPG + +collaborate (see also: git help workflows) + fetch Download objects and refs from another repository + pull Fetch from and integrate with another repository or a local branch + push Update remote refs along with associated objects + +'git help -a' and 'git help -g' list available subcommands and some +concept guides. See 'git help ' or 'git help ' +to read about a specific subcommand or concept. +See 'git help git' for an overview of the system. diff --git a/src/app.ts b/src/app.ts index e55869ef..2431b216 100644 --- a/src/app.ts +++ b/src/app.ts @@ -64,6 +64,7 @@ export default async function({ flags, ...opts }: Args, logger_prefix?: string) } } break case 'install': + await ensure_pantry() await install(await Promise.all(opts.args.map(x => parse_pkg_str(x, {latest: 'ok'})))) break case 'deintegrate': @@ -108,7 +109,7 @@ async function ensure_pantry() { function make_logger(verbosity: number, logger_prefix?: string): IInstallLogger { const logger = new Logger(logger_prefix) - if (verbosity <= -2) { + if (verbosity <= -2 || !Deno.isatty(Deno.stderr.rid)) { return { replace: () => {}, clear: () => {},