The line I replaced is preceded by

else if(typeof process !== undefined) // Node.JS

It's in a block of if/elsif statements that apparently detect the js
runtime and set SPOCK.log accordingly. I just replaced the one for Node and
left the others alone.
NT

On Tue, Mar 31, 2026 at 1:54 PM Felix Winkelmann <
[email protected]> wrote:

> On Tue Mar 31, 2026 at 5:32 AM CEST, Nathan Thern via Chicken-users wrote:
> > Thanks! I found the line in
> > /usr/share/chicken/spock/spock-runtime.js
> > and replaced
> > SPOCK.log = console.log; // Node.JS
> > with
> > SPOCK.log = function() {
> > process.stdout.write(Array.from(arguments).join("")) };
> >
> > There are similar replacements to be made in
> > spock-runtime[-min/debug/debug-min].js, but I'm content to test this for
> a
> > while first.
>
> Very nice! Is there a way to detect whether we run on node?
> If yes, the proper I/O primitives could be selected by default.
>
>
> cheers,
> felix
>
>

Reply via email to