// that the DefaultEnvironment tries to overwrite.
Environment environment = new DefaultEnvironment(ctx.getIo(), new DefaultVariables());
ctx.setEnvironment(environment);
IOTargetSource.setIO(ctx.getIo());
EnvironmentTargetSource.setEnvironment(environment);
InteractiveShell interactiveShell = createInteractiveShell(ctx);
if( args!=null && args.length>0 ) {
return interactiveShell.execute(args);
} else {
try {
interactiveShell.run();
} catch (ExitNotification e) {
return null;
}
}
return null;