Skip to content

Commit

Permalink
Bash: BUG FIX: _p4m_lcg_port() would try to output debug messages to …
Browse files Browse the repository at this point in the history
…file descriptor 3 (not 2 as in stderr). This was a left over from debugging via Bats. It would also only look at ${PORT4ME_DEBUG}, when it should have been ${PORT4ME_DEBUG:-false}
  • Loading branch information
HenrikBengtsson committed Jan 16, 2024
1 parent 1cf3c80 commit 01d7af2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions bash/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Version (development version)

## Bug Fixes

* ...


# Version 0.7.0 [2024-01-15]

## Significant Changes
Expand Down
6 changes: 3 additions & 3 deletions bash/incl/port4me.bash
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' Requirements:
#' * Bash (>= 4)
#'
#' Version: 0.7.0
#' Version: 0.7.0-9001
#' Copyright: Henrik Bengtsson (2022-2024)
#' License: MIT
#' Source code: https://github.com/HenrikBengtsson/port4me
Expand Down Expand Up @@ -293,11 +293,11 @@ _p4m_lcg_port() {
has_subset=true
fi

if ${PORT4ME_DEBUG}; then
if ${PORT4ME_DEBUG:-false}; then
{
echo "(min,max): ($min,$max)"
echo "subset: [n=${#subset[@]}]"
} >&3
}
fi

## Sample values in [0,m-2] (sic!), but reject until in [min,max],
Expand Down

0 comments on commit 01d7af2

Please sign in to comment.