-
Hi, I'm using the [warn] CONTAINER_PATCH_URLS is set: Only use patch URLs from trusted sources!
[info] Downloading patch from URL: https://<...>
[debug] Sourcing patch file: /tmp/patch_url.sh.IeANGd
[info] Completed URL patching. The shell script contains log "Installing custom module"
log_warn "Installing of custom module failed" Is logging from container patch urls not supported? Or is this logged to somewhere else? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
First, I must take this opportunity to reinforce that you only use patch URLs from sources you trust. If your use case supports it, I would suggest downloading the patch, reviewing it, and then using the Now onto your question: Logging is still supported in patch scripts, and the logs all go to the same place. I just wrote up a quick test. I am seeing messages emitted from the patch appearing in the log as expected. See if you get the same results from the Here is a snip from my environment:
- CONTAINER_PATCH_URLS=
https://gist.githubusercontent.com/felddy/711fe7a72baa282e52c4e038894df723/raw/886cef983f8e05e2a29816931e21a2d434d581d0/log_test_patch.sh
- CONTAINER_VERBOSE=true The #!/bin/sh
log_debug "This is a debug message."
log "This is an info message."
log_warn "This is a warning message."
log_error "This is an error message." Log output: foundry_1 | Entrypoint | 2022-01-01 17:03:11 | [debug] Timezone set to: US/Eastern
foundry_1 | Entrypoint | 2022-01-01 17:03:11 | [info] Starting felddy/foundryvtt container v9.238.0
foundry_1 | Entrypoint | 2022-01-01 17:03:11 | [debug] CONTAINER_VERBOSE set. Debug logging enabled.
...
foundry_1 | Entrypoint | 2022-01-01 17:03:15 | [info] Installing Foundry Virtual Tabletop 9.238
foundry_1 | Entrypoint | 2022-01-01 17:03:19 | [debug] Installation completed.
foundry_1 | Entrypoint | 2022-01-01 17:03:19 | [info] Preserving release archive file in cache.
foundry_1 | Entrypoint | 2022-01-01 17:03:19 | [warn] CONTAINER_PATCH_URLS is set: Only use patch URLs from trusted sources!
foundry_1 | Entrypoint | 2022-01-01 17:03:19 | [info] Downloading patch from URL: https://gist.githubusercontent.com/felddy/711fe7a72baa282e52c4e038894df723/raw/886cef983f8e05e2a29816931e21a2d434d581d0/log_test_patch.sh
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [debug] Sourcing patch file: /tmp/patch_url.sh.ammLLJ
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [debug] This is a debug message.
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [info] This is an info message.
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [warn] This is a warning message.
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [error] This is an error message.
foundry_1 | Entrypoint | 2022-01-01 17:03:20 | [info] Completed URL patching.
... |
Beta Was this translation helpful? Give feedback.
-
Thank you for your quick reply, that works. I have a github gist as well, there seems to be a url forwarding from gist.github.com/* to gist.githubusercontent.com/* which does work in a browser, but not as the patch_urls content. You can verify this shortening your url: There is no reported error in case the patch_url has no useful content/bad link. |
Beta Was this translation helpful? Give feedback.
Thank you for your quick reply, that works.
I also found the culprit.
I have a github gist as well, there seems to be a url forwarding from gist.github.com/* to gist.githubusercontent.com/* which does work in a browser, but not as the patch_urls content.
You can verify this shortening your url:
https://gist.githubusercontent.com/felddy/711fe7a72baa282e52c4e038894df723/raw/log_test_patch.sh works fine
https://gist.github.com/felddy/711fe7a72baa282e52c4e038894df723/raw/log_test_patch.sh doesn't work (but works in browser)
There is no reported error in case the patch_url has no useful content/bad link.