From 075120d975d4cd2f8aae90fcd81aa6e7fd79e7e4 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Wed, 23 Oct 2024 17:16:41 +0200 Subject: [PATCH 1/2] fix(powershell): set-c8ymode was calling non existent source function --- pkg/cmd/cli/profile/scripts/plugin.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/cli/profile/scripts/plugin.ps1 b/pkg/cmd/cli/profile/scripts/plugin.ps1 index 0369cce82..6f846777b 100644 --- a/pkg/cmd/cli/profile/scripts/plugin.ps1 +++ b/pkg/cmd/cli/profile/scripts/plugin.ps1 @@ -95,7 +95,7 @@ Enable dev mode (enables POST, PUT and DELETE commands) [parameter(ValueFromRemainingArguments=$true)] $Options ) - c8y settings update --shell auto mode $Mode $Options | source + c8y settings update --shell auto mode $Mode $Options | Out-String | Invoke-Expression Write-Host "Enabled "$Mode" mode (temporarily)" -ForegroundColor Green } From afdaafab73ae93ee533008d6724818b93eb082d6 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Wed, 23 Oct 2024 17:19:36 +0200 Subject: [PATCH 2/2] fix older profile.ps1 script usage of source --- tools/shell/c8y.plugin.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/shell/c8y.plugin.ps1 b/tools/shell/c8y.plugin.ps1 index 23a1d5eee..97ef7a30b 100644 --- a/tools/shell/c8y.plugin.ps1 +++ b/tools/shell/c8y.plugin.ps1 @@ -93,8 +93,6 @@ Enable dev mode (enables POST, PUT and DELETE commands) [parameter(ValueFromRemainingArguments=$true)] $Options ) - c8y settings update --shell auto mode $Mode $Options | source + c8y settings update --shell auto mode $Mode $Options | Out-String | Invoke-Expression Write-Host "Enabled "$Mode" mode (temporarily)" -ForegroundColor Green } - -# Function source { $input | Out-String | Invoke-Expression }