cli
cli copied to clipboard
Issues capturing output of algolia cli / running on headless systems
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.