Skip to content

Commit

Permalink
create profile folder & file if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
clr2of8 committed Mar 28, 2024
1 parent e25f2e0 commit f741b47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Public/Invoke-SetupAtomicRunner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ function Invoke-SetupAtomicRunner {
$root = Split-Path $PSScriptRoot -Parent
$pathToPSD1 = Join-Path $root "Invoke-AtomicRedTeam.psd1"
$importStatement = "Import-Module ""$pathToPSD1"" -Force"
$profileFolder = Split-Path $profile
New-Item -ItemType Directory -Force -Path $profileFolder | Out-Null
New-Item $PROFILE -ErrorAction Ignore
$profileContent = Get-Content $profile
$line = $profileContent | Select-String ".*import-module.*invoke-atomicredTeam.psd1" | Select-Object -ExpandProperty Line
Expand Down

0 comments on commit f741b47

Please sign in to comment.