Skip to content

Commit 691fb6c

Browse files
committed
fix: cippversion
1 parent eb3c8f2 commit 691fb6c

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Modules/CIPPCore/Public/GraphHelper/New-GraphPOSTRequest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function New-GraphPOSTRequest {
3535
}
3636

3737
if (!$headers['User-Agent']) {
38-
$headers['User-Agent'] = "CIPP/$($global:CippVersion ?? '1.0')"
38+
$headers['User-Agent'] = "CIPP/$($env:CippVersion ?? '1.0')"
3939
}
4040

4141
if (!$contentType) {

profile.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ $SwVersion = [System.Diagnostics.Stopwatch]::StartNew()
9696
$CurrentVersion = (Get-Content -Path (Join-Path $PSScriptRoot 'version_latest.txt') -Raw).Trim()
9797
$Table = Get-CippTable -tablename 'Version'
9898
Write-Information "Function App: $($env:WEBSITE_SITE_NAME) | API Version: $CurrentVersion | PS Version: $($PSVersionTable.PSVersion)"
99-
$global:CippVersion = $CurrentVersion
100-
$ENV:CurrentVersion = $CurrentVersion
99+
$env:CippVersion = $CurrentVersion
101100

102101
$LastStartup = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'Version' and RowKey eq '$($env:WEBSITE_SITE_NAME)'"
103102
if (!$LastStartup -or $CurrentVersion -ne $LastStartup.Version) {

0 commit comments

Comments
 (0)