Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array parsing issues, perhaps updating dotenv version will fix? #11

Open
groovenectar opened this issue Oct 4, 2018 · 3 comments
Open

Comments

@groovenectar
Copy link

groovenectar commented Oct 4, 2018

I run into syntax parsing issues occasionally, even when the syntax should be valid bash. For example, a bash array with newlines:

ARRAY=(
	'item1'
	#'commented item'
	'item3'
	'item4'
)

I don't actually need Vagrant to see this array, but I need the provisioning scripts to see it. But since it throws an error on vagrant up from the syntax, I can't get the box started to use it.

The error: Line "\item1'" doesn't match format (Dotenv::FormatError)

In this file: https://github.com/gosuri/vagrant-env/blob/master/vagrant-env.gemspec

There is this line:

spec.add_runtime_dependency "dotenv", "~> 0.9"

The Ruby dotenv library is at version 2.5: https://github.com/bkeepers/dotenv

Perhaps bumping the version will help provided there aren't any major API changes.

I've not yet tried to build and install vagrant plugins for development myself, but it would be on my radar. I use this plugin regularly, it's great and thanks for making it.

@groovenectar
Copy link
Author

@gosuri Verified that the upgrade addresses syntax issues and created pull request #12

@Ig0r-M-magic42
Copy link

@groovenectar have you closed the PR due to inactivity ?

@groovenectar
Copy link
Author

groovenectar commented Mar 17, 2020

@Ig0r-M I can't remember why I closed it... But I remember needing that array support, and I ended up publishing a fork: https://github.com/groovenectar/vagrant-readenv

So you can use vagrant plugin install vagrant-readenv to install it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants