File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -18,3 +18,11 @@ $docker_plugins_dir = "${env:ProgramFiles}\Docker"
18
18
New-Item - ItemType Directory - Force - Path $docker_plugins_dir | Out-Null
19
19
Invoke-WebRequest - Uri $ecr_cred_helper_url - OutFile " $docker_plugins_dir \docker-credential-ecr-login.exe"
20
20
Write-Output " Amazon ECR credential helper v$ecr_cred_helper_version installed to $docker_plugins_dir "
21
+
22
+ Write-Output " Adding Docker plugins directory to system PATH..."
23
+ $oldpath = (Get-ItemProperty - Path ' Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' - Name PATH).Path
24
+ if ($oldpath -notlike " *$docker_plugins_dir *" ) {
25
+ $newpath = " $docker_plugins_dir ;$oldpath "
26
+ Set-ItemProperty - Path ' Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' - Name PATH - Value $newpath
27
+ Write-Output " Added $docker_plugins_dir to system PATH"
28
+ }
You can’t perform that action at this time.
0 commit comments