mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-21 22:47:48 +00:00
Lazily import resin-image-fs
If for whatever reason resin-image-fs is not importable — eg. if it’s built for another arch — any command that imports `helpers.ts` will just quit without any error/traceback.
This commit is contained in:
parent
27b877dd33
commit
916cc36430
@ -19,7 +19,6 @@ import Promise = require('bluebird');
|
||||
import _ = require('lodash');
|
||||
import chalk from 'chalk';
|
||||
import rindle = require('rindle');
|
||||
import imagefs = require('resin-image-fs');
|
||||
import visuals = require('resin-cli-visuals');
|
||||
import ResinSdk = require('resin-sdk');
|
||||
|
||||
@ -85,6 +84,7 @@ export function getManifest(
|
||||
image: string,
|
||||
deviceType: string,
|
||||
): Promise<ResinSdk.DeviceType> {
|
||||
const imagefs = require('resin-image-fs');
|
||||
// Attempt to read manifest from the first
|
||||
// partition, but fallback to the API if
|
||||
// we encounter any errors along the way.
|
||||
|
Loading…
Reference in New Issue
Block a user