mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: Fix log wrapper for vite in scripts/develop.sh (#5030)
The pid tracking refactor resulted in the pipe while echo to block the script from continuing and showing the banner at the end. This change redirects the stdout for the `start_cmd` to a new fd which `while` is reading from.
This commit is contained in:
committed by
GitHub
parent
823b02ac9c
commit
71601f4971
+3
-3
@@ -72,7 +72,7 @@ exit_cleanup() {
|
||||
}
|
||||
start_cmd() {
|
||||
echo "== CMD: $*" >&2
|
||||
"$@" || fatal "CMD: $*" &
|
||||
"$@" 2>&1 || fatal "CMD: $*" &
|
||||
pids+=("$!")
|
||||
}
|
||||
wait_cmds() {
|
||||
@@ -138,11 +138,11 @@ fatal() {
|
||||
fi
|
||||
|
||||
# Start the frontend once we have a template up and running
|
||||
CODER_HOST=http://127.0.0.1:3000 start_cmd yarn --cwd=./site dev --host | {
|
||||
CODER_HOST=http://127.0.0.1:3000 start_cmd yarn --cwd=./site dev --host > >(
|
||||
while read -r line; do
|
||||
echo "[SITE] $(date -Iseconds): $line"
|
||||
done
|
||||
}
|
||||
)
|
||||
|
||||
interfaces=(localhost)
|
||||
if which ip >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user