Code Monkey home page Code Monkey logo

Comments (4)

arrrgi avatar arrrgi commented on June 8, 2024 2

Just wanted to add a big thanks for getting this implemented. I know I've capitalized a large amount of your time and effort recently @twpayne and @halostatue - I can't sing enough praise for how you both provide constructive support and work to keep us the demanding consumers happy!

I will factor these changes into my config before the end of this week and let you know if there are any issues. If I'm to understand correctly, env is now the preferred config object and will be what is carried over into v3 in the future.

from chezmoi.

twpayne avatar twpayne commented on June 8, 2024

chezmoi commands such as status, apply and diff appear to ignore the scriptEnv config object. The only way this currently works is by running chezmoi cd to create a subshell which inherits the scriptEnv defined environment variables before running apply etc.

scriptEnv applies to run_ scripts. It does not apply to arbitrary commands invoked by chezmoi. Changing scriptEnv to apply to all commands run by chezmoi will require some thought about the implications and side-effects.

from chezmoi.

arrrgi avatar arrrgi commented on June 8, 2024

Thanks for the consideration.

My intention behind this feature request was to remove the need to install the VLT CLI and perform vlt login before applying a dotfiles config, using the supported non-interactive method as described at: https://developer.hashicorp.com/vault/tutorials/hcp-vault-secrets-get-started/hcp-vault-secrets-install-cli#configure-the-hcp-vault-secrets-cli

In my prototype, I am prompting the user for these values around the same time as asking for other info such as email address, etc. When Chezmoi is updating the target with templated files with secrets, there is no need to script or manually run vlt login as a pre-requisite task if these env vars are available, and keeps these credentials out of the source controlled config

from chezmoi.

halostatue avatar halostatue commented on June 8, 2024

I will factor these changes into my config before the end of this week and let you know if there are any issues. If I'm to understand correctly, env is now the preferred config object and will be what is carried over into v3 in the future.

That is correct. We have not yet marked scriptEnv as deprecated.

from chezmoi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.