Skip to content

Commit

Permalink
Move thinsg around... hopefully it reproduces?
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller committed Nov 9, 2020
1 parent 44ad93c commit 44f09b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/@jsii/runtime/lib/program.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as process from 'process';

import * as packageInfo from '../package.json';
import { KernelHost } from './host';
import { InputOutput } from './in-out';
Expand All @@ -8,15 +10,15 @@ const version = packageInfo.version;
const noStack = !!process.env.JSII_NOSTACK;
const debug = !!process.env.JSII_DEBUG;

if (debug) {
console.error('@jsii/runtime: debug logging is enabled');
}

const inout = new InputOutput();
const host = new KernelHost(inout, { debug, noStack });

// say hello
inout.write({ hello: `${name}@${version}` });
inout.debug = debug; // we don't want "hello" emitted

console.error(
`@jsii/runtime: debug logging is enabled, stdin is a ${process.stdin.constructor.name}`,
);

host.run();

0 comments on commit 44f09b8

Please sign in to comment.