Skip to content

Commit cc416b6

Browse files
committed
Fix PR comments
1 parent efd8a22 commit cc416b6

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

lib/doctor.ts

+4-20
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,14 @@ export class Doctor implements NativeScriptDoctor.IDoctor {
3232
let result: NativeScriptDoctor.IInfo[] = [];
3333
const sysInfoData = await this.sysInfo.getSysInfo(config);
3434

35-
result = result.concat(
36-
this.processSysInfoItem({
37-
item: sysInfoData.gitVer,
38-
infoMessage: "Git is installed and is configured properly.",
39-
warningMessage: "Git is not installed or not configured properly.",
40-
additionalInformation: "You will not be able to create and work with Screen Builder projects." + EOL
41-
+ "To be able to work with Screen Builder projects, download and install Git as described" + EOL
42-
+ "in https://git-scm.com/downloads and add the git executable to your PATH.",
43-
platforms: Constants.SUPPORTED_PLATFORMS
44-
})
45-
);
46-
47-
if (config && config.platform === Constants.ANDROID_PLATFORM_NAME) {
35+
if (!config || !config.platform || config.platform === Constants.ANDROID_PLATFORM_NAME) {
4836
result = result.concat(this.getAndroidInfos(sysInfoData));
4937
}
5038

51-
if (config && config.platform === Constants.IOS_PLATFORM_NAME) {
39+
if (!config || !config.platform || config.platform === Constants.IOS_PLATFORM_NAME) {
5240
result = result.concat(await this.getiOSInfos(sysInfoData));
5341
}
5442

55-
if (!config || !config.platform) {
56-
result = result.concat(this.getAndroidInfos(sysInfoData), await this.getiOSInfos(sysInfoData));
57-
}
58-
5943
if (!this.hostInfo.isDarwin) {
6044
result.push({
6145
message: "Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.",
@@ -163,7 +147,7 @@ export class Doctor implements NativeScriptDoctor.IDoctor {
163147
platforms: [Constants.IOS_PLATFORM_NAME]
164148
})
165149
);
166-
150+
167151
if (sysInfoData.xcodeVer && sysInfoData.cocoaPodsVer) {
168152
let isCocoaPodsWorkingCorrectly = await this.sysInfo.isCocoaPodsWorkingCorrectly();
169153
result = result.concat(
@@ -176,7 +160,7 @@ export class Doctor implements NativeScriptDoctor.IDoctor {
176160
})
177161
);
178162
}
179-
163+
180164
result = result.concat(
181165
this.processSysInfoItem({
182166
item: !sysInfoData.cocoaPodsVer || !semver.valid(sysInfoData.cocoaPodsVer) || !semver.lt(sysInfoData.cocoaPodsVer, Doctor.MIN_SUPPORTED_POD_VERSION),

lib/sys-info.ts

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import * as path from "path";
99
import * as osenv from "osenv";
1010
import * as temp from "temp";
1111
import * as semver from "semver";
12-
import { constants } from "zlib";
1312
import { Constants } from "./constants";
1413

1514
export class SysInfo implements NativeScriptDoctor.ISysInfo {

test/sys-info.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { EOL } from "os";
44
import { SysInfo } from "../lib/sys-info";
55
import { Helpers } from "../lib/helpers";
66
import { ChildProcess } from "../lib/wrappers/child-process";
7-
import { constants } from "zlib";
87

98
const JavaHomeName = "JAVA_HOME";
109
const AndroidHomeName = "ANDROID_HOME";

0 commit comments

Comments
 (0)