forkit-connect 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,11 +87,13 @@ function isWindowsCredentialNotFound(stderr, status) {
|
|
|
87
87
|
const WINDOWS_DPAPI_SCRIPTS = {
|
|
88
88
|
status: [
|
|
89
89
|
"$ErrorActionPreference = 'Stop'",
|
|
90
|
+
'Add-Type -AssemblyName System.Security',
|
|
90
91
|
'[void][System.Security.Cryptography.DataProtectionScope]::CurrentUser',
|
|
91
92
|
"[Console]::Out.Write('windows-dpapi-ready')",
|
|
92
93
|
].join('; '),
|
|
93
94
|
read: [
|
|
94
95
|
"$ErrorActionPreference = 'Stop'",
|
|
96
|
+
'Add-Type -AssemblyName System.Security',
|
|
95
97
|
'$path = $env:FORKIT_CONNECT_WINDOWS_CREDENTIAL_PATH',
|
|
96
98
|
'if (-not (Test-Path -LiteralPath $path)) { exit 44 }',
|
|
97
99
|
'$raw = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::UTF8)',
|
|
@@ -104,6 +106,7 @@ const WINDOWS_DPAPI_SCRIPTS = {
|
|
|
104
106
|
].join('; '),
|
|
105
107
|
write: [
|
|
106
108
|
"$ErrorActionPreference = 'Stop'",
|
|
109
|
+
'Add-Type -AssemblyName System.Security',
|
|
107
110
|
'$path = $env:FORKIT_CONNECT_WINDOWS_CREDENTIAL_PATH',
|
|
108
111
|
'$directory = Split-Path -Parent $path',
|
|
109
112
|
'if ($directory) { [System.IO.Directory]::CreateDirectory($directory) | Out-Null }',
|