Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
itsspriyansh committed Aug 14, 2024
1 parent b15afed commit 9d4994b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/commands/android/subcommands/install/system-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@ import colors from 'ansi-colors';
import inquirer from 'inquirer';

import Logger from '../../../../logger';
import {symbols} from '../../../../utils';
import {APILevelNames} from '../../constants';
import {AvailableSystemImages, Platform} from '../../interfaces';
import {getBinaryLocation} from '../../utils/common';
import {execBinarySync} from '../../utils/sdk';
import {showMissingBinaryHelp} from '../common';

export async function installSystemImage(sdkRoot: string, platform: Platform): Promise<boolean> {
try {
const sdkmanagerLocation = getBinaryLocation(sdkRoot, platform, 'sdkmanager', true);
if (!sdkmanagerLocation) {
Logger.log(` ${colors.red(symbols().fail)} ${colors.cyan('sdkmanager')} binary not found.\n`);
Logger.log(`Run: ${colors.cyan('npx @nightwatch/mobile-helper android --standalone')} to setup missing requirements.`);
Logger.log(`(Remove the ${colors.gray('--standalone')} flag from the above command if setting up for testing.)\n`);
showMissingBinaryHelp('sdkmanager');

return false;
}
Expand Down

0 comments on commit 9d4994b

Please sign in to comment.