Skip to content

Commit 4d3419e

Browse files
chore: replace failWithoutHelp with fail
1 parent eead2d2 commit 4d3419e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

lib/commands/apple-login.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class AppleLogin implements ICommand {
2424

2525
const user = await this.$applePortalSessionService.createUserSession({ username, password });
2626
if (!user.areCredentialsValid) {
27-
this.$errors.failWithoutHelp(`Invalid username and password combination. Used '${username}' as the username.`);
27+
this.$errors.fail(`Invalid username and password combination. Used '${username}' as the username.`);
2828
}
2929

3030
const output = Buffer.from(user.userSessionCookie).toString("base64");

lib/commands/appstore-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class ListiOSApps implements ICommand {
3737
sessionBase64: this.$options.appleSessionBase64,
3838
});
3939
if (!user.areCredentialsValid) {
40-
this.$errors.failWithoutHelp(`Invalid username and password combination. Used '${username}' as the username.`);
40+
this.$errors.fail(`Invalid username and password combination. Used '${username}' as the username.`);
4141
}
4242

4343
const applications = await this.$applePortalApplicationService.getApplications(user);

lib/commands/appstore-upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class PublishIOS implements ICommand {
4646
requireApplicationSpecificPassword: true
4747
});
4848
if (!user.areCredentialsValid) {
49-
this.$errors.failWithoutHelp(`Invalid username and password combination. Used '${username}' as the username.`);
49+
this.$errors.fail(`Invalid username and password combination. Used '${username}' as the username.`);
5050
}
5151

5252
if (!mobileProvisionIdentifier && !ipaFilePath) {

lib/services/apple-portal/apple-portal-session-service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ export class ApplePortalSessionService implements IApplePortalSessionService {
9898
result.isTwoFactorAuthenticationEnabled = statusCode === 409;
9999

100100
if (result.isTwoFactorAuthenticationEnabled && opts && opts.requireApplicationSpecificPassword && !opts.applicationSpecificPassword) {
101-
this.$errors.failWithoutHelp(`Your account has two-factor authentication enabled but --appleApplicationSpecificPassword option is not provided.
101+
this.$errors.fail(`Your account has two-factor authentication enabled but --appleApplicationSpecificPassword option is not provided.
102102
To generate an application-specific password, please go to https://appleid.apple.com/account/manage.
103103
This password will be used for the iTunes Transporter, which is used to upload your application.`);
104104
}
105105

106106
if (result.isTwoFactorAuthenticationEnabled && opts && opts.requireInteractiveConsole && !isInteractive()) {
107-
this.$errors.failWithoutHelp(`Your account has two-factor authentication enabled, but your console is not interactive.
107+
this.$errors.fail(`Your account has two-factor authentication enabled, but your console is not interactive.
108108
For more details how to set up your environment, please execute "tns publish ios --help".`);
109109
}
110110

@@ -192,7 +192,7 @@ For more details how to set up your environment, please execute "tns publish ios
192192

193193
this.$applePortalCookieService.updateUserSessionCookie(authTrustResponse.headers["set-cookie"]);
194194
} else {
195-
this.$errors.failWithoutHelp(`Although response from Apple indicated activated Two-step Verification or Two-factor Authentication, NativeScript CLI don't know how to handle this response: ${data}`);
195+
this.$errors.fail(`Although response from Apple indicated activated Two-step Verification or Two-factor Authentication, NativeScript CLI don't know how to handle this response: ${data}`);
196196
}
197197
}
198198
}

0 commit comments

Comments
 (0)