Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 688c5ad

Browse files
committed
Fix incorrect validation for iTunes on Linux - we consider it existing.
1 parent d1230fa commit 688c5ad

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

validators/iTunes-validator.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import hostInfo = require("../host-info");
88
export class ITunesValidator implements Mobile.IiTunesValidator {
99
private static NOT_INSTALLED_iTUNES_ERROR_MESSAGE = "iTunes is not installed. Install it on your system and run this command again.";
1010
private static BITNESS_MISMATCH_ERROR_MESSAGE = "The bitness of Node.js and iTunes must match. Verify that both Node.js and iTunes are 32-bit or 64-bit and try again.";
11+
private static UNSUPPORTED_OS_ERROR_MESSAGE = "iTunes is not available for this operating system. You will not be able to work with connected iOS devices.";
1112

1213
constructor(private $fs: IFileSystem) { }
1314

@@ -38,21 +39,23 @@ export class ITunesValidator implements Mobile.IiTunesValidator {
3839
if(!this.isiTunesInstalledOnWindows(commonProgramFiles).wait()) {
3940
return ITunesValidator.NOT_INSTALLED_iTUNES_ERROR_MESSAGE;
4041
}
42+
43+
return null;
4144
} else if(hostInfo.isDarwin()) {
4245
let coreFoundationDir = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
4346
let mobileDeviceDir = "/System/Library/PrivateFrameworks/MobileDevice.framework/MobileDevice";
4447

4548
if(!this.isiTunesInstalledCore(coreFoundationDir, mobileDeviceDir).wait()) {
4649
return ITunesValidator.NOT_INSTALLED_iTUNES_ERROR_MESSAGE;
4750
}
48-
}
4951

50-
return null;
52+
return null;
53+
}
5154

55+
return ITunesValidator.UNSUPPORTED_OS_ERROR_MESSAGE;
5256
}).future<string>()();
5357
}
5458

55-
5659
private isiTunesInstalledOnWindows(commonProgramFiles: string): IFuture<boolean> {
5760
let coreFoundationDir = path.join(commonProgramFiles, "Apple", "Apple Application Support");
5861
let mobileDeviceDir = path.join(commonProgramFiles, "Apple", "Mobile Device Support");

0 commit comments

Comments
 (0)