Skip to content

Commit 385e8a6

Browse files
authored
Misc (#24)
* Overrule TF resource check * Install Beyond Compare * Fix PATH
1 parent 8c8af5a commit 385e8a6

File tree

4 files changed

+22
-17
lines changed

4 files changed

+22
-17
lines changed

common/functions/terraform.ps1

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,16 @@ function Erase-TerraformAzureResources {
133133
}
134134

135135
try {
136-
# Validate whether non-azurerm resources are present
137-
terraform state list | Select-String -Pattern "^((?!data).)*$" | Select-String -Pattern '\.(azuredevops|azuread)_' | Set-Variable aadOrAzdoResources
138-
if ($aadOrAzdoResources) {
139-
Write-Warning "The following resources are present in the Terraform state, which are not supported by this function:"
140-
$aadOrAzdoResources
141-
return
136+
if (!$Force) {
137+
# Validate whether non-azurerm resources are present
138+
terraform state list | Select-String -Pattern "^((?!data).)*$" | Select-String -Pattern '\.(azuredevops|azuread)_' | Set-Variable aadOrAzdoResources
139+
if ($aadOrAzdoResources) {
140+
Write-Warning "The following resources are present in the Terraform state, which are not supported by this function:"
141+
$aadOrAzdoResources
142+
return
143+
}
142144
}
143145

144-
145146
if (!$Repository) {
146147
$Repository = Find-RepositoryDirectory
147148
}

common/profile.ps1

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ Get-ChildItem $functionsPath -filter "*.ps1" | ForEach-Object {
5858
. $_.FullName
5959
}
6060

61-
if ($host.Name -eq 'ConsoleHost')
62-
{
63-
Import-InstalledModule posh-git
64-
# Import-InstalledModule oh-my-posh
65-
# Requires PSReadLine 2.0
66-
#Set-Theme Agnoster
67-
#Set-Theme Paradox
68-
Import-InstalledModule Terminal-Icons
69-
}
70-
7161
if ($IsWindows) {
7262
$env:HOME ??= "${env:HOMEDRIVE}${env:HOMEPATH}"
7363
$env:SOURCES_DIR = (Join-Path $env:HOME "Source")
@@ -85,6 +75,8 @@ if ($PSVersionTable.PSEdition -and ($PSVersionTable.PSEdition -eq "Core") -and (
8575
# Manage PATH environment variable
8676
[System.Collections.ArrayList]$pathList = $env:PATH.Split(":")
8777
[System.Collections.ArrayList]$directories = @(
78+
"/bin",
79+
"/usr/bin",
8880
"/usr/local/bin",
8981
"~/.dotnet/tools",
9082
"/usr/local/share/dotnet"
@@ -144,6 +136,16 @@ if (Test-Path -Path $environmentPath) {
144136
}
145137
}
146138

139+
if ($host.Name -eq 'ConsoleHost')
140+
{
141+
Import-InstalledModule posh-git
142+
# Import-InstalledModule oh-my-posh
143+
# Requires PSReadLine 2.0
144+
#Set-Theme Agnoster
145+
#Set-Theme Paradox
146+
Import-InstalledModule Terminal-Icons
147+
}
148+
147149
if ($printMessages) {
148150

149151
$azModule = Get-Module Az -ListAvailable | Select-Object -First 1

macOS/Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ tap "z80oolong/tmux"
1919
cask "azure-data-studio"
2020
cask "cameracontroller"
2121
cask "db-browser-for-sqlite"
22+
cask "beyond-compare"
2223
cask "docker"
2324
cask "dotnet-sdk"
2425
#cask "dropbox"

windows/chocolatey-developer.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<package id="azure-functions-core-tools" packageParameters="/x64:true"/>
1111
<!-- package id="azurepowershell" /-->
1212
<package id="azurestorageemulator" />
13+
<package id="beyondcompare" />
1314
<!-- package id="bosh-cli" /-->
1415
<package id="cascadiacode" />
1516
<package id="cascadiacodepl" />

0 commit comments

Comments
 (0)