Skip to content

Commit

Permalink
Adding C prefix to all Carbon commands (part 2).
Browse files Browse the repository at this point in the history
  • Loading branch information
splatteredbits committed Nov 27, 2018
1 parent 0691f05 commit 1a70d92
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 216 deletions.
2 changes: 1 addition & 1 deletion Carbon/Functions/Protect-String.ps1
Expand Up @@ -191,7 +191,7 @@ filter Protect-CString
{
if( $PSCmdlet.ParameterSetName -eq 'DPAPIForUser' )
{
$protectStringPath = Join-Path -Path $CarbonBinDir -ChildPath 'Protect-CString.ps1' -Resolve
$protectStringPath = Join-Path -Path $CarbonBinDir -ChildPath 'Protect-String.ps1' -Resolve
$encodedString = Protect-CString -String $String -ForComputer
$argumentList = '-ProtectedString {0}' -f $encodedString
Invoke-CPowerShell -ExecutionPolicy 'ByPass' -NonInteractive -FilePath $protectStringPath -ArgumentList $argumentList -Credential $Credential |
Expand Down
2 changes: 1 addition & 1 deletion Carbon/Functions/Remove-DotNetAppSetting.ps1
Expand Up @@ -105,7 +105,7 @@ function Remove-CDotNetAppSetting

$runtimes | ForEach-Object {
$params = @{
FilePath = (Join-Path $CarbonBinDir 'Remove-CDotNetAppSetting.ps1' -Resolve);
FilePath = (Join-Path $CarbonBinDir 'Remove-DotNetAppSetting.ps1' -Resolve);
ArgumentList = @(
(ConvertTo-CBase64 -Value $Name)
);
Expand Down
10 changes: 5 additions & 5 deletions Carbon/Functions/Remove-EnvironmentVariable.ps1
Expand Up @@ -88,11 +88,11 @@ function Remove-CEnvironmentVariable

if( $PSCmdlet.ParameterSetName -eq 'ForSpecificUser' )
{
Invoke-CPowerShell -FilePath (Join-Path -Path $PSScriptRoot -ChildPath '..\bin\Remove-CEnvironmentVariable.ps1' -Resolve) `
-Credential $credential `
-ArgumentList ('-Name {0}' -f (ConvertTo-CBase64 $Name)) `
-NonInteractive `
-OutputFormat 'text'
Invoke-CPowerShell -FilePath (Join-Path -Path $PSScriptRoot -ChildPath '..\bin\Remove-EnvironmentVariable.ps1' -Resolve) `
-Credential $credential `
-ArgumentList ('-Name {0}' -f (ConvertTo-CBase64 $Name)) `
-NonInteractive `
-OutputFormat 'text'
return
}

Expand Down
2 changes: 1 addition & 1 deletion Carbon/Functions/Set-DotNetAppSetting.ps1
Expand Up @@ -106,7 +106,7 @@ function Set-CDotNetAppSetting

$runtimes | ForEach-Object {
$params = @{
FilePath = (Join-Path $CarbonBinDir 'Set-CDotNetAppSetting.ps1' -Resolve);
FilePath = (Join-Path $CarbonBinDir 'Set-DotNetAppSetting.ps1' -Resolve);
ArgumentList = @(
(ConvertTo-CBase64 -Value $Name),
(ConvertTo-CBase64 -Value $Value)
Expand Down
2 changes: 1 addition & 1 deletion Carbon/Functions/Set-DotNetConnectionString.ps1
Expand Up @@ -119,7 +119,7 @@ function Set-CDotNetConnectionString

$runtimes | ForEach-Object {
$params = @{
FilePath = (Join-Path $CarbonBinDir 'Set-CDotNetConnectionString.ps1' -Resolve);
FilePath = (Join-Path $CarbonBinDir 'Set-DotNetConnectionString.ps1' -Resolve);
ArgumentList = @(
(ConvertTo-CBase64 -Value $Name),
(ConvertTo-CBase64 -Value $Value),
Expand Down
2 changes: 1 addition & 1 deletion Carbon/Functions/Set-EnvironmentVariable.ps1
Expand Up @@ -96,7 +96,7 @@ function Set-CEnvironmentVariable

if( $PSCmdlet.ParameterSetName -eq 'ForSpecificUser' )
{
Invoke-CPowerShell -FilePath (Join-Path -Path $PSScriptRoot -ChildPath '..\bin\Set-CEnvironmentVariable.ps1' -Resolve) `
Invoke-CPowerShell -FilePath (Join-Path -Path $PSScriptRoot -ChildPath '..\bin\Set-EnvironmentVariable.ps1' -Resolve) `
-Credential $credential `
-ArgumentList ('-Name {0} -Value {1}' -f (ConvertTo-CBase64 $Name),(ConvertTo-CBase64 $Value)) `
-NonInteractive `
Expand Down
2 changes: 1 addition & 1 deletion Test/Cryptography/Unprotect-String.ps1
Expand Up @@ -27,5 +27,5 @@ Add-Type -AssemblyName 'System.Security'
. (Join-Path -Path $PSScriptRoot -ChildPath '..\..\Carbon\Functions\Use-CallerPreference.ps1' -Resolve)
. (Join-Path -Path $PSScriptRoot -ChildPath '..\..\Carbon\Functions\Unprotect-String.ps1' -Resolve)

Unprotect-String -ProtectedString $ProtectedString
Unprotect-CString -ProtectedString $ProtectedString

0 comments on commit 1a70d92

Please sign in to comment.