Skip to content
New issue

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

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

Already on GitHub? # to your account

parsing env vars in scripts #46

Merged
merged 1 commit into from
Oct 24, 2015
Merged

parsing env vars in scripts #46

merged 1 commit into from
Oct 24, 2015

Conversation

zabawaba99
Copy link
Collaborator

The code looks for env vars to start with '2729' instead of just a single '$' no matter the operating system.

resolves #42

TODO:

  • Add documentation to README regarding parsing environment.


// check for environment variables inside script
if !strings.Contains(s, "$$") {
continue
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using continue and a negated condition why not just insert the replaceEnvs here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I had all the logic in here and didn't want all the nesting. I wouldn't mind moving replaceEnv to this line.

The code looks for env vars to start with '2729' instead of just a single '$' no matter
the operating system.
@Tonkpils
Copy link
Owner

👍

Tonkpils added a commit that referenced this pull request Oct 24, 2015
parsing env vars in scripts
@Tonkpils Tonkpils merged commit c091494 into master Oct 24, 2015
@Tonkpils Tonkpils deleted the env-parsing branch October 24, 2015 16:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse environment variable replacement tokens in .snag.yml
2 participants