eas-cli icon indicating copy to clipboard operation
eas-cli copied to clipboard

Parse Error --json flag with outdated eas version

Open timhbt opened this issue 5 years ago • 0 comments

Summary

There is an error when I try to access the json output via jq with outdated eas version.

eas build:list --json | jq '.[0].artifacts.buildUrl'

Output:

parse error: Invalid numeric literal at line 1, column 4 ✔ Linked to project @xxx-xxx/xxx-xxx (​https://expo.dev/accounts/xxx-xxx/projects/xxx-xxx​) ✔ Showing last 10 builds for the project @xxx-xxx/xxx-xxx

If eas is the most recent version, then no Error appears.

Run command like eas build:list --json there is a message in the top:

★ [email protected] is now available, please upgrade. Proceeding with outdated version

So jq can't handle this.

It would be good if there is a flag that hides the outdated version message (like --silent) or the flag --json avoid output this message.

Environment

EAS CLI 0.37.0 environment info: System: OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa) Shell: 5.0.17 - /bin/bash Binaries: Node: 14.18.1 - /tmp/yarn--1637869735900-0.9996445321081959/node Yarn: 1.22.15 - /tmp/yarn--1637869735900-0.9996445321081959/yarn npm: 6.14.15 - /usr/bin/npm Utilities: Git: 2.25.1 - /usr/bin/git npmPackages: expo: ^43.0.3 => 43.0.3 expo-cli: 4.13.0 => 4.13.0 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1

Error output

No response

Reproducible demo or steps to reproduce from a blank project

Run eas build:list --json | jq '.[0].artifacts.buildUrl' or yarn run -s eas build:list --json | jq '.[0].artifacts.buildUrl' with outdated eas version.

timhbt avatar Nov 25 '21 19:11 timhbt