mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 03:20:11 +00:00
Fix unbound variable error in temperature proxy installation
Related to #681 The variable local_proxy_binary was declared with local scope inside the BUILD_FROM_SOURCE conditional block but referenced outside of it during cleanup. This caused "unbound variable" errors on release installs since the script uses set -u. Moved the declaration before the conditional block and initialize to empty string. The cleanup code [[ -f "$local_proxy_binary" ]] already handles the empty string case safely.
This commit is contained in:
parent
999e598e44
commit
438d3b6b7b
1 changed files with 2 additions and 1 deletions
|
|
@ -1407,8 +1407,9 @@ fi'; then
|
|||
|
||||
# If building from source, copy the binary from the LXC instead of downloading
|
||||
local proxy_install_args=(--ctid "$CTID" --skip-restart)
|
||||
local local_proxy_binary=""
|
||||
if [[ "$BUILD_FROM_SOURCE" == "true" ]]; then
|
||||
local local_proxy_binary="/tmp/pulse-sensor-proxy-$CTID"
|
||||
local_proxy_binary="/tmp/pulse-sensor-proxy-$CTID"
|
||||
print_info "Copying locally-built pulse-sensor-proxy binary from container..."
|
||||
if pct pull $CTID /opt/pulse/bin/pulse-sensor-proxy "$local_proxy_binary" 2>/dev/null; then
|
||||
proxy_install_args=(--ctid "$CTID" --local-binary "$local_proxy_binary" --skip-restart)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue