algolia / algolia/cli

Issues capturing output of algolia cli / running on headless systems

Open
#170 6 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
Go
Stars
109
Forks
32
Avg merge
9d 3h
Merged PRs (30d)
3

Description

A couple of issues spotted when running algolia CLI headless:

## 1 - important - using algolia cli for reporting from scripts

Seems like algolia CLI is a good component for no code integrations if this was fixed

```
psql -t postgres://user@pass:host.name/mydb -c 'select row_to_json(a) from my_data a' \
| algolia objects import my_poc --file - \
| tee /tmp/result.txt ; cat /tmp/result.txt && echo ===END==
```

results in this output on console and the empty file `/tmp/result.txt`:

```
===END==
```

I would expect to see something like the below in the file and console but it's empty.

```
✓ Successfully imported 9999 objects to my_poc 9.99999s
```

## This one is less important but still significant

Shows that the CLI is written with some assumptions about what type of system it's running on. In this case a headless VM in the cloud:

```
$ algolia open cli-repo
exec: "xdg-open": executable file not found in $PATH
```

In this case where xdg-open is unavailable I'd expect the tool to echo the URL.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.