You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: trim space and remove redundant variables (#491)
# Pull Request
## Issue
Issue #, if available:
## Description
Description of changes:
## License
By submitting this pull request, I confirm that my contribution is made
under the terms of the projects associated license.
Copy file name to clipboardExpand all lines: src/ALZ/Private/Deploy-Accelerator-Helpers/New-Bootstrap.ps1
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -93,14 +93,21 @@ function New-Bootstrap {
93
93
$starterFoldersToRetain=@()
94
94
95
95
if ($hasStarter) {
96
-
if ($inputConfig.starter_module_name.Value-eq"") {
96
+
if (!$inputConfig.starter_module_name.Value) {
97
97
Write-InformationColored"No starter module has been specified. Please supply the starter module you wish to deploy..."-ForegroundColor Red -InformationAction Continue
98
98
throw"No starter module has been specified. Please supply the starter module you wish to deploy..."
Write-InformationColored"The starter module name '$($starter_module_name)' does not exist in the starter configuration. Please check your input and try again."-ForegroundColor Red -InformationAction Continue
107
+
throw"The starter module name '$($starter_module_name)' does not exist in the starter configuration. Please check your input and try again."
Copy file name to clipboardExpand all lines: src/ALZ/Public/Deploy-Accelerator.ps1
+7-28Lines changed: 7 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -20,29 +20,6 @@ function Deploy-Accelerator {
20
20
[Alias("inputConfigFilePath")]
21
21
[string[]] $inputConfigFilePaths=@(),
22
22
23
-
[Parameter(
24
-
Mandatory=$false,
25
-
HelpMessage="[REQUIRED] The infrastructure as code type to target. Supported options are 'bicep', 'bicep-classic', 'terraform' or 'local'. Environment variable: ALZ_iac_type. Config file input: iac_type.")]
26
-
[Alias("i")]
27
-
[Alias("iac")]
28
-
[string] $iac_type="",
29
-
30
-
[Parameter(
31
-
Mandatory=$false,
32
-
HelpMessage="[REQUIRED] The bootstrap module to deploy. Environment variable: ALZ_bootstrap_module_name. Config file input: bootstrap_module_name."
33
-
)]
34
-
[Alias("b")]
35
-
[Alias("bootstrap")]
36
-
[string] $bootstrap_module_name="",
37
-
38
-
[Parameter(
39
-
Mandatory=$false,
40
-
HelpMessage="[REQUIRED] The starter module to deploy. Environment variable: ALZ_starter_module_name. Config file input: starter_module_name."
41
-
)]
42
-
[Alias("s")]
43
-
[Alias("starter")]
44
-
[string] $starter_module_name="",
45
-
46
23
[Parameter(
47
24
Mandatory=$false,
48
25
HelpMessage="[OPTIONAL] The additional files or folders to be copied directly to the starter module root folder. Environment variable: ALZ_starter_additional_files. Config file input: starter_additional_files."
@@ -254,12 +231,12 @@ function Deploy-Accelerator {
Write-InformationColored"No Infrastructure as Code type has been specified. Please supply the IAC type you wish to deploy..."-ForegroundColor Red -InformationAction Continue
259
-
throw"No Infrastructure as Code type has been specified. Please supply the IAC type you wish to deploy..."
236
+
throw"No Infrastructure as Code type has been specified. Please supply the IAC type you wish to deploy..."
260
237
}
261
238
262
-
if ($inputConfig.iac_type.Value-like"bicep*") {
239
+
if ($inputConfig.iac_type.Value.ToString()-like"bicep*") {
263
240
Write-InformationColored"Although you have selected Bicep, the Accelerator leverages the Terraform tool to bootstrap your Version Control System and Azure. This will not impact your choice of Bicep post this initial bootstrap. Please refer to our documentation for further details..."-ForegroundColor Yellow -InformationAction Continue
264
241
}
265
242
@@ -301,14 +278,16 @@ function Deploy-Accelerator {
301
278
$zonesSupport=$null
302
279
303
280
# Request the bootstrap type if not already specified
Write-InformationColored"No bootstrap module has been specified. Please supply the bootstrap module you wish to deploy..."-ForegroundColor Red -InformationAction Continue
306
283
throw"No bootstrap module has been specified. Please supply the bootstrap module you wish to deploy..."
0 commit comments