Be lazier with imports in oclif actions

Change-type: patch
This commit is contained in:
Pagan Gazzard
2020-07-08 18:21:37 +01:00
parent 463f3f40ca
commit d6f1328238
15 changed files with 52 additions and 50 deletions

View File

@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { BalenaApplicationNotFound } from 'balena-errors';
import type * as BalenaSdk from 'balena-sdk';
import _ = require('lodash');
@ -391,6 +390,7 @@ export async function getOnlineTargetUuid(
})),
});
} catch (err) {
const { BalenaApplicationNotFound } = await import('balena-errors');
if (!instanceOf(err, BalenaApplicationNotFound)) {
throw err;
}