Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow prepare for Android without ANDROID_HOME #2904

Merged
merged 3 commits into from
Jun 20, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/commands/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class DebugIOSCommand extends DebugPlatformCommand {
$projectData: IProjectData,
$platformsData: IPlatformsData,
$iosDeviceOperations: IIOSDeviceOperations,
$debugLiveSyncService: IDebugLiveSyncService, ) {
$debugLiveSyncService: IDebugLiveSyncService) {
super($iOSDebugService, $devicesService, $debugDataService, $platformService, $projectData, $options, $platformsData, $logger,
$errors, $debugLiveSyncService, $config);
// Do not dispose ios-device-lib, so the process will remain alive and the debug application (NativeScript Inspector or Chrome DevTools) will be able to connect to the socket.
Expand Down
9 changes: 6 additions & 3 deletions lib/commands/prepare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ export class PrepareCommand implements ICommand {
public async canExecute(args: string[]): Promise<boolean> {
const platform = args[0];
const result = await this.$platformCommandParameter.validate(platform) && await this.$platformService.validateOptions(this.$options.provision, this.$projectData, platform);
const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
const platformProjectService = platformData.platformProjectService;
await platformProjectService.validate(this.$projectData);
if (!result) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should check if (result)

const platformData = this.$platformsData.getPlatformData(platform, this.$projectData);
const platformProjectService = platformData.platformProjectService;
await platformProjectService.validate(this.$projectData);
}

return result;
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"glob": "^7.0.3",
"iconv-lite": "0.4.11",
"inquirer": "0.9.0",
"ios-device-lib": "0.4.5",
"ios-device-lib": "0.4.6",
"ios-mobileprovision-finder": "1.0.9",
"ios-sim-portable": "~3.0.0",
"lockfile": "1.0.1",
Expand Down