-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add support for non-interactive bootstrapping #2528
Conversation
there should be a cleaner way to do this imo, i'll look into it this weekend |
I suggest just changing line 43 to: local input = env.NVCHAD_INSTALL_EXAMPLE_CONFIG or fn.input "Do you want to install example custom config? (y/N): " instead of creating an unnecessary function that won't ever be used again |
This is interesting. Any update on this workaround? |
env is always empty here, how does one set env var? |
Well, Technically we can use something like |
Hey, there's a method you can use: vim.api.nvim_create_user_command("NoInput", function ()
local file = io.open("foo.txt", "w")
if file then
file:close()
else
print("Error creating the file.")
end
end,{}) This creates a file if they provide |
@siduck in this specific codeblock |
oh cool, ive to actually read the PR now |
#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
why again?
|
wym again?
such users are supposed to keep it y or n ,if it fails then its their problem. We have provided env var check then they must follow it |
And now the next question. Where is the documentation for the env var? |
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
Add support for non-interactive bootstrapping (NvChad#2528)
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com> (cherry picked from commit 2fedda1)
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
NvChad#2528 (comment) --------- Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
Currently, bootstrapping NvChad requires interactive input on the first run, which makes it impossible to use in Dockerfiles. This PR adds a way to answer the "Do you want to install example custom config?" prompt non-interactively via an environment variable.
To run bootstrapping non-interactively, set the
NVCHAD_INSTALL_EXAMPLE_CONFIG
environment variable to the answer you want, and then run nvim, e.g.:Which will automatically do all bootstrapping without installing the example config and then immediately exit.