Skip to content

Commit a5e543e

Browse files
authored
fix(style): adjust localstack aws profile (#41)
Refer to profile in singular
1 parent 1d06af7 commit a5e543e

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
},
8888
{
8989
"command": "localstack.configureAwsProfiles",
90-
"title": "Configure \"localstack\" AWS Profiles",
90+
"title": "Configure AWS Profile \"localstack\"",
9191
"category": "LocalStack"
9292
}
9393
],

src/plugins/setup.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export default createPlugin(
220220

221221
/////////////////////////////////////////////////////////////////////
222222
progress.report({
223-
message: "Configuring AWS profiles...",
223+
message: "Configuring AWS profile...",
224224
});
225225
await minDelay(
226226
configureAwsProfiles({
@@ -232,7 +232,8 @@ export default createPlugin(
232232
void commands.executeCommand("localstack.refreshStatusBar");
233233

234234
progress.report({
235-
message: 'Finished configuring "localstack" AWS profiles.',
235+
message:
236+
'Finished configuring the AWS profile named "localstack".',
236237
});
237238
await minDelay(Promise.resolve());
238239

src/utils/configure-aws.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function overrideSelection(
4444
}
4545
const fileList = filesToModify.join(" and ");
4646
const selection = await window.showWarningMessage(
47-
`The "localstack" AWS profile in ${fileList} exists, but does not match the expected properties. Do you want to override it?`,
47+
`The AWS profile named "localstack" in ${fileList} exists, but does not match the expected properties. Do you want to override it?`,
4848
"Override",
4949
);
5050
return selection;
@@ -180,7 +180,7 @@ async function configureAwsConfigProfile(
180180
} catch (error) {
181181
const errorMessage = error instanceof Error ? error.message : String(error);
182182
window.showErrorMessage(
183-
`Failed to configure the "localstack" AWS profile in [${awsConfigFilenameReadable}]: ${errorMessage}`,
183+
`Failed to configure the AWS profile named "localstack" in [${awsConfigFilenameReadable}]: ${errorMessage}`,
184184
);
185185
}
186186
}
@@ -238,7 +238,7 @@ async function configureCredentialsProfile(
238238
} catch (error) {
239239
const errorMessage = error instanceof Error ? error.message : String(error);
240240
window.showErrorMessage(
241-
`Failed to configure the "localstack" AWS profile in [${awsCredentialsFilenameReadable}]: ${errorMessage}`,
241+
`Failed to configure the AWS profile named "localstack" in [${awsCredentialsFilenameReadable}]: ${errorMessage}`,
242242
);
243243
}
244244
return false;
@@ -316,7 +316,7 @@ export async function configureAwsProfiles(options: {
316316
// if everything in place, show user that no changes were made and return
317317
if (options?.notifyNoChangesMade) {
318318
window.showInformationMessage(
319-
'The "localstack" AWS profiles were already present, so no changes were made.',
319+
'The AWS profile named "localstack" was already present, so no changes were made.',
320320
);
321321
}
322322
options.telemetry?.track({
@@ -332,7 +332,7 @@ export async function configureAwsProfiles(options: {
332332
});
333333
return;
334334
} else {
335-
// profiles are there but need adjustment
335+
// profile is there but needs adjustment
336336
// in testing, we always override
337337
if (options?.forceOverride) {
338338
overrideDecision = "Override";
@@ -346,7 +346,7 @@ export async function configureAwsProfiles(options: {
346346
}
347347
}
348348
} else {
349-
// if any of the profiles don't exist, we need to create it
349+
// we need to create it
350350
overrideDecision = "Override";
351351
}
352352

@@ -383,7 +383,7 @@ export async function configureAwsProfiles(options: {
383383
),
384384
]);
385385
window.showInformationMessage(
386-
'Successfully added the "localstack" AWS profile to "~/.aws/config" and "~/.aws/credentials".',
386+
'Successfully added the AWS profile named "localstack" to "~/.aws/config" and "~/.aws/credentials".',
387387
);
388388
options.telemetry?.track({
389389
name: "aws_profile_configured",
@@ -405,7 +405,7 @@ export async function configureAwsProfiles(options: {
405405
overrideDecision,
406406
);
407407
window.showInformationMessage(
408-
'Successfully added the "localstack" AWS profile to "~/.aws/config".',
408+
'Successfully added the AWS profile named "localstack" to "~/.aws/config".',
409409
);
410410
options.telemetry?.track({
411411
name: "aws_profile_configured",
@@ -427,7 +427,7 @@ export async function configureAwsProfiles(options: {
427427
overrideDecision,
428428
);
429429
window.showInformationMessage(
430-
'Successfully added the "localstack" AWS profile to "~/.aws/credentials".',
430+
'Successfully added the AWS profile named "localstack" to "~/.aws/credentials".',
431431
);
432432
options.telemetry?.track({
433433
name: "aws_profile_configured",
@@ -464,7 +464,7 @@ export async function checkIsProfileConfigured(): Promise<boolean> {
464464
return false;
465465
}
466466

467-
return true; // Both profiles exist and are properly configured
467+
return true; // profile exists in both files and is properly configured
468468
} catch (error) {
469469
return false;
470470
}

0 commit comments

Comments
 (0)