We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If you're trying to troubleshoot issues with ENVBUILDER_SETUP_SCRIPT, you would most likely need to view the log output.
ENVBUILDER_SETUP_SCRIPT
I've noticed that if running envbuilder with no stdout/stdin attached, you end up missing the log output:
envbuilder
Example (main@aba2f46):
$ docker run -d -e ENVBUILDER_GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer -e ENVBUILDER_INIT_SCRIPT='bash' -e ENVBUILDER_SETUP_SCRIPT="echo 'setting up...'; sleep 3; echo 'done' | tee /setup.log" envbuilder:latest envbuilder v1.0.3+dev-aba2f46 - Build development environments from repositories in a container [...] === Running the setup command "echo 'setting up...'; sleep 3; echo 'done' | tee /setup.log" as the root user... === Running init command as user "coder": ["/bin/sh" "-c" "bash"]
Whereas running with a terminal attached results in the logs becoming visible:
docker run -it -e ENVBUILDER_GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer -e ENVBUILDER_INIT_SCRIPT='bash' -e ENVBUILDER_ SETUP_SCRIPT="echo 'setting up...'; sleep 3; echo 'done' | tee /setup.log" envbuilder:latest envbuilder v1.0.3+dev-aba2f46 - Build development environments from repositories in a container [...] === Running the setup command "echo 'setting up...'; sleep 3; echo 'done' | tee /setup.log" as the root user... setting up... done === Running init command as user "coder": ["/bin/sh" "-c" "bash"] 🐳 5a1e4fa7be68 envbuilder-starter-devcontainer #
Redirect or tee the output to some file (as shown in the above examples).
Not sure yet!
The text was updated successfully, but these errors were encountered:
This looks like a plain logic bug, we're scanning an empty bytes.Buffer, that'll just exit immediately and never log anything.
bytes.Buffer
envbuilder/envbuilder.go
Lines 895 to 900 in c4b082e
Sorry, something went wrong.
fix: enable logging for setup script when not a tty
1fc808a
Fixes #394
mafredri
Successfully merging a pull request may close this issue.
Motivation
If you're trying to troubleshoot issues with
ENVBUILDER_SETUP_SCRIPT
, you would most likely need to view the log output.I've noticed that if running
envbuilder
with no stdout/stdin attached, you end up missing the log output:Example (main@aba2f46):
Whereas running with a terminal attached results in the logs becoming visible:
Workaround
Redirect or tee the output to some file (as shown in the above examples).
Proposed Solution
Not sure yet!
The text was updated successfully, but these errors were encountered: