Skip to content

Commit

Permalink
Change test to detect something has been sent to stdout
Browse files Browse the repository at this point in the history
Test something has been rendered by looking at the settings arrays or
lists rather checking stdout channel. (which does not seem to work, as
it returns -1.
  • Loading branch information
xdelaruelle committed Nov 29, 2017
1 parent cfce0b6 commit 39b06cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modulecmd.tcl.in
Original file line number Diff line number Diff line change
Expand Up @@ -2684,6 +2684,9 @@ proc renderSettings {} {
puts stdout "import os"
}
}
set has_rendered 1
} else {
set has_rendered 0
}

if {$g_autoInit} {
Expand Down Expand Up @@ -3103,7 +3106,8 @@ proc renderSettings {} {
} elseif {$g_return_false} {
reportDebug "renderSettings: false value should be returned."
renderFalse
} elseif {[tell stdout]} {
} elseif {$has_rendered} {
# finish with true statement if something has been put
renderTrue
}
}
Expand Down

0 comments on commit 39b06cf

Please sign in to comment.