Lazy-load drive list

This commit is contained in:
Pagan Gazzard 2019-01-11 18:36:13 +00:00
parent 3cc632fbbb
commit dad3167f16

View File

@ -19,8 +19,6 @@ import chalk from 'chalk';
import { stripIndent } from 'common-tags';
import * as sdk from 'etcher-sdk';
import { DriveList } from '../../utils/visuals/drive-list';
async function getDrive(options: {
drive?: string;
}): Promise<sdk.sourceDestination.BlockDevice> {
@ -37,6 +35,7 @@ async function getDrive(options: {
}
drive = d;
} else {
const { DriveList } = await import('../../utils/visuals/drive-list');
const driveList = new DriveList(scanner);
drive = await driveList.run();
}