Skip to content

Commit 38778ac

Browse files
committed
fix: deprecate failWithoutHelp in favor of fail
1 parent 4fc544e commit 38778ac

File tree

87 files changed

+191
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+191
-191
lines changed

lib/android-tools-info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
9292
*/
9393
private printMessage(msg: string, showWarningsAsErrors: boolean): void {
9494
if (showWarningsAsErrors) {
95-
this.$errors.failWithoutHelp(msg);
95+
this.$errors.fail(msg);
9696
} else {
9797
this.$logger.warn(msg);
9898
}
@@ -104,7 +104,7 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
104104
if (userSpecifiedCompileSdk) {
105105
const androidCompileSdk = `${androidToolsInfo.ANDROID_TARGET_PREFIX}-${userSpecifiedCompileSdk}`;
106106
if (!_.includes(installedTargets, androidCompileSdk)) {
107-
this.$errors.failWithoutHelp(`You have specified '${userSpecifiedCompileSdk}' for compile sdk, but it is not installed on your system.`);
107+
this.$errors.fail(`You have specified '${userSpecifiedCompileSdk}' for compile sdk, but it is not installed on your system.`);
108108
}
109109

110110
return userSpecifiedCompileSdk;

lib/commands/add-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class AddPlatformCommand extends ValidatePlatformCommandBase implements I
2727
this.$platformValidationService.validatePlatform(arg, this.$projectData);
2828

2929
if (!this.$platformValidationService.isPlatformSupportedForOS(arg, this.$projectData)) {
30-
this.$errors.failWithoutHelp(`Applications for platform ${arg} can not be built on this OS`);
30+
this.$errors.fail(`Applications for platform ${arg} can not be built on this OS`);
3131
}
3232

3333
const output = await super.canExecuteCommandBase(arg);

lib/commands/appstore-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class ListiOSApps implements ICommand {
1717

1818
public async execute(args: string[]): Promise<void> {
1919
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, this.$projectData)) {
20-
this.$errors.failWithoutHelp(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
20+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
2121
}
2222

2323
let username = args[0];

lib/commands/appstore-upload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ export class PublishIOS implements ICommand {
7979

8080
public async canExecute(args: string[]): Promise<boolean> {
8181
if (!this.$hostInfo.isDarwin) {
82-
this.$errors.failWithoutHelp("iOS publishing is only available on Mac OS X.");
82+
this.$errors.fail("iOS publishing is only available on Mac OS X.");
8383
}
8484

8585
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, this.$projectData)) {
86-
this.$errors.failWithoutHelp(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
86+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
8787
}
8888

8989
return true;

lib/commands/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase {
3030

3131
protected validatePlatform(platform: string): void {
3232
if (!this.$platformValidationService.isPlatformSupportedForOS(platform, this.$projectData)) {
33-
this.$errors.failWithoutHelp(`Applications for platform ${platform} can not be built on this OS`);
33+
this.$errors.fail(`Applications for platform ${platform} can not be built on this OS`);
3434
}
3535
}
3636

lib/commands/debug.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class DebugPlatformCommand extends ValidatePlatformCommandBase implements
6060
this.$androidBundleValidatorHelper.validateNoAab();
6161

6262
if (!this.$platformValidationService.isPlatformSupportedForOS(this.platform, this.$projectData)) {
63-
this.$errors.failWithoutHelp(`Applications for platform ${this.platform} can not be built on this OS`);
63+
this.$errors.fail(`Applications for platform ${this.platform} can not be built on this OS`);
6464
}
6565

6666
if (this.$options.release) {
@@ -105,18 +105,18 @@ export class DebugIOSCommand implements ICommand {
105105

106106
public async canExecute(args: string[]): Promise<ICanExecuteCommandOutput> {
107107
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, this.$projectData)) {
108-
this.$errors.failWithoutHelp(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
108+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
109109
}
110110

111111
const isValidTimeoutOption = this.isValidTimeoutOption();
112112
if (!isValidTimeoutOption) {
113-
this.$errors.failWithoutHelp(`Timeout option must be a number.`);
113+
this.$errors.fail(`Timeout option specifies the seconds NativeScript CLI will wait to find the inspector socket port from device's logs. Must be a number.`);
114114
}
115115

116116
if (this.$options.inspector) {
117117
const macOSWarning = await this.$sysInfo.getMacOSWarningMessage();
118118
if (macOSWarning && macOSWarning.severity === SystemWarningsSeverity.high) {
119-
this.$errors.failWithoutHelp(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
119+
this.$errors.fail(`You cannot use NativeScript Inspector on this OS. To use it, please update your OS.`);
120120
}
121121
}
122122
const result = await this.debugPlatformCommand.canExecute(args);

lib/commands/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class GenerateCommand implements ICommand {
1212
try {
1313
await run(this.executionOptions);
1414
} catch (error) {
15-
this.$errors.failWithoutHelp(error.message);
15+
this.$errors.fail(error.message);
1616
}
1717
}
1818

lib/commands/plugin/add-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class AddPluginCommand implements ICommand {
1919
const installedPlugins = await this.$pluginsService.getAllInstalledPlugins(this.$projectData);
2020
const pluginName = args[0].toLowerCase();
2121
if (_.some(installedPlugins, (plugin: IPluginData) => plugin.name.toLowerCase() === pluginName)) {
22-
this.$errors.failWithoutHelp(`Plugin "${pluginName}" is already installed.`);
22+
this.$errors.fail(`Plugin "${pluginName}" is already installed.`);
2323
}
2424

2525
return true;

lib/commands/plugin/build-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class BuildPluginCommand implements ICommand {
5454

5555
public async canExecute(args: string[]): Promise<boolean> {
5656
if (!this.$fs.exists(path.join(this.pluginProjectPath, constants.PLATFORMS_DIR_NAME, "android"))) {
57-
this.$errors.failWithoutHelp("No plugin found at the current directory, or the plugin does not need to have its platforms/android components built into an `.aar`.");
57+
this.$errors.fail("No plugin found at the current directory, or the plugin does not need to have its platforms/android components built into an `.aar`.");
5858
}
5959

6060
return true;

lib/commands/plugin/create-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export class CreatePluginCommand implements ICommand {
9292
this.$fs.createDirectory(projectDir);
9393

9494
if (this.$fs.exists(projectDir) && !this.$fs.isEmptyDir(projectDir)) {
95-
this.$errors.failWithoutHelp(this.pathAlreadyExistsMessageTemplate, projectDir);
95+
this.$errors.fail(this.pathAlreadyExistsMessageTemplate, projectDir);
9696
}
9797
}
9898

lib/commands/plugin/remove-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class RemovePluginCommand implements ICommand {
2929

3030
const pluginName = args[0].toLowerCase();
3131
if (!_.some(pluginNames, name => name.toLowerCase() === pluginName)) {
32-
this.$errors.failWithoutHelp(`Plugin "${pluginName}" is not installed.`);
32+
this.$errors.fail(`Plugin "${pluginName}" is not installed.`);
3333
}
3434

3535
return true;

lib/commands/plugin/update-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class UpdatePluginCommand implements ICommand {
2929

3030
const pluginName = args[0].toLowerCase();
3131
if (!_.some(installedPluginNames, name => name.toLowerCase() === pluginName)) {
32-
this.$errors.failWithoutHelp(`Plugin "${pluginName}" is not installed.`);
32+
this.$errors.fail(`Plugin "${pluginName}" is not installed.`);
3333
}
3434

3535
return true;

lib/commands/resources/resources-update.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export class ResourcesUpdateCommand implements ICommand {
1919

2020
for (const platform of args) {
2121
if (!this.$androidResourcesMigrationService.canMigrate(platform)) {
22-
this.$errors.failWithoutHelp(`The ${platform} does not need to have its resources updated.`);
22+
this.$errors.fail(`The ${platform} does not need to have its resources updated.`);
2323
}
2424

2525
if (this.$androidResourcesMigrationService.hasMigrated(this.$projectData.getAppResourcesDirectoryPath())) {
26-
this.$errors.failWithoutHelp("The App_Resources have already been updated for the Android platform.");
26+
this.$errors.fail("The App_Resources have already been updated for the Android platform.");
2727
}
2828
}
2929

lib/commands/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export class RunIosCommand implements ICommand {
8282
const projectData = this.$projectDataService.getProjectData();
8383

8484
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.iOS, projectData)) {
85-
this.$errors.failWithoutHelp(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
85+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.iOS} can not be built on this OS`);
8686
}
8787

8888
const result = await this.runCommand.canExecute(args) && await this.$platformValidationService.validateOptions(this.$options.provision, this.$options.teamId, projectData, this.$devicePlatformsConstants.iOS.toLowerCase());
@@ -123,7 +123,7 @@ export class RunAndroidCommand implements ICommand {
123123
await this.runCommand.canExecute(args);
124124

125125
if (!this.$platformValidationService.isPlatformSupportedForOS(this.$devicePlatformsConstants.Android, this.$projectData)) {
126-
this.$errors.failWithoutHelp(`Applications for platform ${this.$devicePlatformsConstants.Android} can not be built on this OS`);
126+
this.$errors.fail(`Applications for platform ${this.$devicePlatformsConstants.Android} can not be built on this OS`);
127127
}
128128

129129
if (this.$options.release && (!this.$options.keyStorePath || !this.$options.keyStorePassword || !this.$options.keyStoreAlias || !this.$options.keyStoreAliasPassword)) {

lib/commands/test-init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TestInitCommand implements ICommand {
3737
try {
3838
modulesToInstall = this.$testInitializationService.getDependencies(frameworkToInstall);
3939
} catch (err) {
40-
this.$errors.failWithoutHelp(`Unable to install the unit testing dependencies. Error: '${err.message}'`);
40+
this.$errors.fail(`Unable to install the unit testing dependencies. Error: '${err.message}'`);
4141
}
4242

4343
modulesToInstall = modulesToInstall.filter(moduleToInstall => !moduleToInstall.projectType || moduleToInstall.projectType === projectFilesExtension);

lib/commands/test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,10 @@ abstract class TestCommandBase {
6969

7070
const canStartKarmaServer = await this.$testExecutionService.canStartKarmaServer(this.$projectData);
7171
if (!canStartKarmaServer) {
72-
// this.$errors.failWithoutHelp({
73-
// formatStr: "Error: In order to run unit tests, your project must already be configured by running $ tns test init.",
74-
// suppressCommandHelp: true,
75-
// errorCode: ErrorCodes.TESTS_INIT_REQUIRED
76-
// });
72+
this.$errors.fail({
73+
formatStr: "Error: In order to run unit tests, your project must already be configured by running $ tns test init.",
74+
errorCode: ErrorCodes.TESTS_INIT_REQUIRED
75+
});
7776
}
7877

7978
return output.canExecute && canStartKarmaServer;

lib/commands/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class UpdateCommand implements ICommand {
3030
});
3131

3232
if (shouldMigrate) {
33-
this.$errors.failWithoutHelp(UpdateCommand.SHOULD_MIGRATE_PROJECT_MESSAGE);
33+
this.$errors.fail(UpdateCommand.SHOULD_MIGRATE_PROJECT_MESSAGE);
3434
}
3535

3636
return args.length < 2 && this.$projectData.projectDir !== "";

lib/common/child-process.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,12 @@ export class ChildProcess extends EventEmitter implements IChildProcess {
165165
}
166166
}
167167

168-
// TODO: remove?
169168
public async tryExecuteApplication(command: string, args: string[], event: string,
170169
errorMessage: string, condition: (_childProcess: any) => boolean): Promise<any> {
171170
const childProcess = await this.tryExecuteApplicationCore(command, args, event, errorMessage);
172171

173172
if (condition && condition(childProcess)) {
174-
this.$errors.failWithoutHelp(errorMessage);
173+
this.$errors.fail(errorMessage);
175174
}
176175
}
177176

@@ -180,7 +179,7 @@ export class ChildProcess extends EventEmitter implements IChildProcess {
180179
return this.spawnFromEvent(command, args, event, undefined, { throwError: false });
181180
} catch (e) {
182181
const message = (e.code === "ENOENT") ? errorMessage : e.message;
183-
this.$errors.failWithoutHelp(message);
182+
this.$errors.fail(message);
184183
}
185184
}
186185

lib/common/commands/device/get-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class GetFileCommand implements ICommand {
1818
// ignore the error
1919
}
2020
if (!this.$projectData.projectIdentifiers) {
21-
this.$errors.failWithoutHelp("Please enter application identifier or execute this command in project.");
21+
this.$errors.fail("Please enter application identifier or execute this command in project.");
2222
}
2323
}
2424

lib/common/commands/device/list-devices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ListDevicesCommand implements ICommand {
1515
if (this.$options.availableDevices) {
1616
const platform = this.$mobileHelper.normalizePlatformName(args[0]);
1717
if (!platform && args[0]) {
18-
this.$errors.failWithoutHelp(`${args[0]} is not a valid device platform. The valid platforms are ${formatListOfNames(this.$mobileHelper.platformNames)}`);
18+
this.$errors.failWithHelp(`${args[0]} is not a valid device platform. The valid platforms are ${formatListOfNames(this.$mobileHelper.platformNames)}`);
1919
}
2020

2121
const availableEmulatorsOutput = await this.$devicesService.getEmulatorImages({ platform });

lib/common/commands/device/list-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class ListFilesCommand implements ICommand {
1919
// ignore the error
2020
}
2121
if (!this.$projectData.projectIdentifiers) {
22-
this.$errors.failWithoutHelp("Please enter application identifier or execute this command in project.");
22+
this.$errors.fail("Please enter application identifier or execute this command in project.");
2323
}
2424
}
2525

lib/common/commands/device/put-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class PutFileCommand implements ICommand {
1818
// ignore the error
1919
}
2020
if (!this.$projectData.projectIdentifiers) {
21-
this.$errors.failWithoutHelp("Please enter application identifier or execute this command in project.");
21+
this.$errors.fail("Please enter application identifier or execute this command in project.");
2222
}
2323
}
2424

lib/common/commands/device/run-application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class RunApplicationOnDeviceCommand implements ICommand {
1212
await this.$devicesService.initialize({ deviceId: this.$options.device, skipInferPlatform: true });
1313

1414
if (this.$devicesService.deviceCount > 1) {
15-
this.$errors.failWithoutHelp("More than one device found. Specify device explicitly with --device option. To discover device ID, use $%s device command.", this.$staticConfig.CLIENT_NAME.toLowerCase());
15+
this.$errors.failWithHelp("More than one device found. Specify device explicitly with --device option. To discover device ID, use $%s device command.", this.$staticConfig.CLIENT_NAME.toLowerCase());
1616
}
1717

1818
await this.$devicesService.execute(async (device: Mobile.IDevice) => await device.applicationManager.startApplication({ appId: args[0], projectName: args[1], projectDir: null }));

lib/common/commands/post-install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class PostInstallCommand implements ICommand {
66
public allowedParameters: ICommandParameter[] = [];
77

88
public async execute(args: string[]): Promise<void> {
9-
this.$errors.failWithoutHelp("This command is deprecated. Use `tns dev-post-install-cli` instead");
9+
this.$errors.fail("This command is deprecated. Use `tns dev-post-install-cli` instead");
1010
}
1111
}
1212
$injector.registerCommand("dev-post-install", PostInstallCommand);

lib/common/commands/proxy/proxy-set.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export class ProxySetCommand extends ProxyCommandBase {
6565

6666
if (!isInteractive()) {
6767
if (noPort) {
68-
this.$errors.failWithoutHelp(`The port you have specified (${port || "none"}) is not valid.`);
68+
this.$errors.failWithHelp(`The port you have specified (${port || "none"}) is not valid.`);
6969
} else if (this.isPasswordRequired(username, password)) {
7070
this.$errors.failWithHelp("Console is not interactive - you need to supply all command parameters.");
7171
}

lib/common/declarations.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,13 @@ interface IOpener {
560560
interface IErrors {
561561
fail(formatStr: string, ...args: any[]): never;
562562
fail(opts: IFailOptions, ...args: any[]): never;
563+
/**
564+
* DEPRECATED: use `fail` instead
565+
*/
563566
failWithoutHelp(message: string, ...args: any[]): never;
567+
/**
568+
* DEPRECATED: use `fail` instead
569+
*/
564570
failWithoutHelp(opts: IFailOptions, ...args: any[]): never;
565571
failWithHelp(formatStr: string, ...args: any[]): never;
566572
failWithHelp(opts: IFailOptions, ...args: any[]): never;

lib/common/dispatchers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class FutureDispatcher implements IFutureDispatcher {
7373

7474
public async run(): Promise<void> {
7575
if (this.actions) {
76-
this.$errors.failWithoutHelp("You cannot run a running future dispatcher.");
76+
this.$errors.fail("You cannot run a running future dispatcher.");
7777
}
7878
this.actions = new queue.Queue<any>();
7979

lib/common/errors.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,16 @@ export class Errors implements IErrors {
124124
public printCallStack: boolean = false;
125125

126126
public fail(optsOrFormatStr: string | IFailOptions, ...args: any[]): never {
127-
return this.failWithoutHelp(optsOrFormatStr, args);
128-
}
129-
130-
public failWithoutHelp(optsOrFormatStr: string | IFailOptions, ...args: any[]): never {
131127
const opts = this.getFailOptions(optsOrFormatStr);
132128
opts.suppressCommandHelp = true;
133129
return this.failWithOptions(opts, args);
134130
}
135131

132+
// DEPRECATED: use .fail instead
133+
public failWithoutHelp(optsOrFormatStr: string | IFailOptions, ...args: any[]): never {
134+
return this.failWithoutHelp(optsOrFormatStr, args);
135+
}
136+
136137
public failWithHelp(optsOrFormatStr: string | IFailOptions, ...args: any[]): never {
137138
const opts = this.getFailOptions(optsOrFormatStr);
138139
opts.suppressCommandHelp = false;

lib/common/host-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class HostInfo implements IHostInfo {
108108
await this.dotNetVersion();
109109
return true;
110110
} catch (e) {
111-
this.$errors.failWithoutHelp(message || "An error occurred while reading the registry.");
111+
this.$errors.fail(message || "An error occurred while reading the registry.");
112112
}
113113
} else {
114114
return false;

lib/common/mobile/android/android-application-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class AndroidApplicationManager extends ApplicationManagerBase {
9494
});
9595
} else {
9696
await this.$logcatHelper.dump(this.identifier);
97-
this.$errors.failWithoutHelp(`Unable to find running "${appIdentifier}" application on device "${deviceIdentifier}".`);
97+
this.$errors.fail(`Unable to find running "${appIdentifier}" application on device "${deviceIdentifier}".`);
9898
}
9999
}
100100
}

lib/common/mobile/android/android-debug-bridge-result-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class AndroidDebugBridgeResultHandler implements Mobile.IAndroidDebugBrid
267267
if (treatErrorsAsWarnings) {
268268
this.$logger.warn(errorMessages);
269269
} else {
270-
this.$errors.failWithoutHelp(errorMessages);
270+
this.$errors.fail(errorMessages);
271271
}
272272
}
273273
}

lib/common/mobile/android/device-android-debug-bridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class DeviceAndroidDebugBridge extends AndroidDebugBridge implements Mobi
2828
return +match[1];
2929
}
3030

31-
this.$errors.failWithoutHelp("Unable to broadcast to android device:\n%s", result);
31+
this.$errors.fail("Unable to broadcast to android device:\n%s", result);
3232
}
3333

3434
protected async composeCommand(params: string[]): Promise<IComposeCommandResult> {

lib/common/mobile/ios/device/ios-application-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
2929
@hook('install')
3030
public async installApplication(packageFilePath: string): Promise<void> {
3131
await this.$iosDeviceOperations.install(packageFilePath, [this.device.deviceInfo.identifier], (err: IOSDeviceLib.IDeviceError) => {
32-
this.$errors.failWithoutHelp(`Failed to install ${packageFilePath} on device with identifier ${err.deviceId}. Error is: ${err.message}`);
32+
this.$errors.fail(`Failed to install ${packageFilePath} on device with identifier ${err.deviceId}. Error is: ${err.message}`);
3333
});
3434
}
3535

@@ -58,7 +58,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
5858

5959
public async startApplication(appData: Mobile.IStartApplicationData): Promise<void> {
6060
if (!await this.isApplicationInstalled(appData.appId)) {
61-
this.$errors.failWithoutHelp("Invalid application id: %s. All available application ids are: %s%s ", appData.appId, EOL, this.applicationsLiveSyncInfos.join(EOL));
61+
this.$errors.fail("Invalid application id: %s. All available application ids are: %s%s ", appData.appId, EOL, this.applicationsLiveSyncInfos.join(EOL));
6262
}
6363

6464
await this.setDeviceLogData(appData);

0 commit comments

Comments
 (0)