adobe / adobe/aio-cli

Cryptic error message - uncaught error condition

Open
#331 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
95
Forks
45
PR merge metrics
No merged PRs in 30d

Description

### Expected Behaviour

When error condition exists, the cli politely informs the user what was wrong with their command

### Actual Behaviour

developer needs a degree in crypto-zoology to figure out where the error is coming from

### Reproduce Scenario (including but not limited to)

I have no idea how the user arrived at this state, but it IS possible that our template tooling produced an app config that was not valid. Most likely this was the result of an attempt to change an existing app from the old structure to the new structure.

#### Steps to Reproduce

1. add the sample code listed below
2. run any command that reads app config ex. `aio app info`

#### Environment Info
```
System:
OS: macOS 11.6
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 21.37 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.0 - ~/.nvm/versions/node/v14.18.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.0/bin/npm
Virtualization:
Docker: 20.10.8 - /usr/local/bin/docker
npmGlobalPackages:
@adobe/aio-cli: 8.2.0
```
#### Sample Code that illustrates the problem

##### app.config.yaml
```yml
hooks:
test: "jest --passWithNoTests ./test",
e2e: "jest --collectCoverage=false --testRegex ./e2e"
```

#### Logs taken while reproducing problem
```bash
✗ aio app info
› Error: bad indentation of a mapping entry at line 45, column 52:
› ... "jest --passWithNoTests ./test",

```

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.