Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions smithy-cli/configuration/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ if exist "%choice_path%" goto upgrade

:: Copy the installation
xcopy /i /h /e /k "%installer_path%*" "%choice_path%\"
setx path "%path%;%choice_path%\;"
call %exe_name% warmup
set "smithy_install_dir=%choice_path%"
powershell -Command "& { $installDir = $env:smithy_install_dir; $userPath = [Environment]::GetEnvironmentVariable('PATH','User'); if ([string]::IsNullOrEmpty($userPath)) { [Environment]::SetEnvironmentVariable('PATH', $installDir, 'User') } elseif (-not $userPath.Contains($installDir)) { [Environment]::SetEnvironmentVariable('PATH', $userPath.TrimEnd(';') + ';' + $installDir, 'User') } }"
Comment thread
kstich marked this conversation as resolved.
if %ERRORLEVEL% neq 0 (
echo Failed to update PATH. You may need to add %choice_path%\bin to your PATH manually.
Comment thread
dscpinheiro marked this conversation as resolved.
Outdated
goto done
)
call "%choice_path%\bin\%exe_name%" warmup
echo You may now run '%exe_name% --version'
goto done

Expand Down
Loading