Comments (11)
$ bashly validate
Psych::SyntaxError
(src/conf/build.yml): did not find expected key while parsing a block mapping at line 80 column 5
from bashly.
$ bashly validate
/usr/bin/bashly:25:in `<main>'
/usr/bin/bashly:25:in `load'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/bin/bashly:9:in `<top (required)>'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/runner.rb:36:in `run'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/runner.rb:47:in `execute'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/command.rb:19:in `execute'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/validate.rb:12:in `run'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:18:in `validate_config'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:14:in `config_validator'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:10:in `config'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/config.rb:13:in `new'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:16:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `map'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:38:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:16:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `map'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:38:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:9:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:25:in `safe_load_yaml'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/extensions/yaml.rb:4:in `properly_load_file'
/usr/lib/ruby/3.1.0/psych.rb:670:in `load_file'
/usr/lib/ruby/3.1.0/psych.rb:670:in `open'
/usr/lib/ruby/3.1.0/psych.rb:671:in `block in load_file'
/usr/lib/ruby/3.1.0/psych.rb:370:in `load'
/usr/lib/ruby/3.1.0/psych.rb:324:in `safe_load'
/usr/lib/ruby/3.1.0/psych.rb:399:in `parse'
/usr/lib/ruby/3.1.0/psych.rb:455:in `parse_stream'
/usr/lib/ruby/3.1.0/psych.rb:455:in `parse'
Psych::SyntaxError
(src/conf/build.yml): did not find expected key while parsing a block mapping at line 80 column 5
from bashly.
If I duplicate line 79 import to line 80 the error still reports line 80 as the same problem.
from bashly.
Is it possible that line 80 refers to a different file? Even a temporary file?
from bashly.
This is an invalid YAML error. I cannot help without seeing the YAMLs.
This is probably an indentation error.
from bashly.
This is an invalid YAML error.
Agreed. But what is invalid?
The vscode linter from Redhat says everything is good:
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
This is probably an indentation error.
Maybe that could be a test case - to land on error logic that isolates the error?
from bashly.
I cannot help without seeing the YAMLs.
from bashly.
there are a couple of 1000 lines.... should we start at line 1 :)
Maybe that could be a test case - to land on error logic that isolates the error?
from bashly.
Is you get a Psych::SyntaxError
, this is outside of bashly's control. It means the YAML is not a valid YAML syntax, and the Ruby YAML library is incapable of reading it.
If you have a YAML file with over 2000 lines, you should split it using import
.
You can also try to figure out what is wrong with your YAML in an online service such as http://www.yamllint.com/
Another debugging trick: delete half the file and try. If you still see an error, it is in the other half. Rinse and repeat.
There is literally nothing I can do from bashly's perspective. If the Psych error does not show you the exact file and line it fails on, neither can I.
from bashly.
If you have a YAML file with over 2000 lines, you should split it using
import
.
Addressed above.
You can also try to figure out what is wrong with your YAML in an online service such as
Addressed above.
There is literally nothing I can do from bashly's perspective.
I'm more optimistic - just busy right now.
from bashly.
I am closing this issue.
It is not something I can fix, and I cannot help you fix your YAML without seeing it.
from bashly.
Related Issues (20)
- Is there any security consideration for the "bash name"? HOT 4
- Provide a third state to `strict` which omits `set -e` HOT 10
- Support for Alternate Dependencies HOT 12
- bashly about “The goal is to generate a new file and fill it with many variables” HOT 2
- Do something when a root command's flag is set HOT 8
- The `initialize` file is not loaded when using `.bash` extension
- Treat `initialize.sh` like the `before` and `after` hooks
- Automatically execute bashly generate when file change HOT 3
- Support storing variable via yaml file HOT 4
- `allowed` incompatible with `required: false` HOT 6
- Flags should not be set to their default value if not explicitly used HOT 3
- Flags must have a long form if you specify a default value HOT 3
- Whitespace not respected in here documents HOT 1
- Decide whether to use `bashly-` prefix for YAML configs HOT 6
- `bashly` completions for Bash, Fish, Zsh HOT 17
- Private commands appear in completion suggestion
- Questions about generated scripts (set -e) HOT 2
- Color escape sequences are not correctly shown in terminal HOT 8
- Organize scripts in src dir in subdirectories HOT 8
- Pass bashly.yml through ERB HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bashly.