Skip to content

Commit 7edfa24

Browse files
committed
fix: make verbose flag work from the very beginning
1 parent 664f2c1 commit 7edfa24

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/SwingSet/src/initializeSwingset.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import bundleSource from '@agoric/bundle-source';
99
import './types.js';
1010
import { insistStorageAPI } from './storageAPI.js';
1111
import { initializeKernel } from './kernel/initializeKernel.js';
12+
import { kdebugEnable } from './kernel/kdebug.js';
1213

1314
/**
1415
* @param {X[]} xs
@@ -218,7 +219,7 @@ export function swingsetIsInitialized(hostStorage) {
218219
* @param {SwingSetConfig} config
219220
* @param {string[]} argv
220221
* @param {HostStore} hostStorage
221-
* @param {{ kernelBundles?: Record<string, string> }} initializationOptions
222+
* @param {{ kernelBundles?: Record<string, string>, verbose?: boolean }} initializationOptions
222223
* @param {{ env?: Record<string, string | undefined > }} runtimeOptions
223224
*/
224225
export async function initializeSwingset(
@@ -266,7 +267,10 @@ export async function initializeSwingset(
266267
assert.fail(X`unknown manager type ${defaultManagerType}`);
267268
}
268269

269-
const { kernelBundles = await buildKernelBundles() } = initializationOptions;
270+
const {
271+
kernelBundles = await buildKernelBundles(),
272+
verbose,
273+
} = initializationOptions;
270274

271275
kvStore.set('kernelBundle', JSON.stringify(kernelBundles.kernel));
272276
kvStore.set('lockdownBundle', JSON.stringify(kernelBundles.lockdown));
@@ -386,5 +390,8 @@ export async function initializeSwingset(
386390
await bundleBundles(config.vats, 'vats');
387391
await bundleBundles(config.devices, 'devices');
388392

393+
if (verbose) {
394+
kdebugEnable(true);
395+
}
389396
return initializeKernel(config, hostStorage);
390397
}

0 commit comments

Comments
 (0)