Move tools config to tools.json

Refactor tools functions to use Records and object literals
This commit is contained in:
Shivam Mathur
2021-07-05 16:03:10 +05:30
parent 60ff774608
commit 6449431df2
11 changed files with 1239 additions and 833 deletions

View File

@ -302,8 +302,8 @@ Function Add-Tool() {
$bat_content += "SET BIN_TARGET=%~dp0/" + $tool
$bat_content += "php %BIN_TARGET% %*"
Set-Content -Path $bin_dir\$tool.bat -Value $bat_content
Add-ToProfile $current_profile $tool "New-Alias $tool $bin_dir\$tool.bat" >$null 2>&1
Add-ToolsHelper $tool
Add-ToProfile $current_profile $tool "New-Alias $tool $bin_dir\$tool.bat" >$null 2>&1
$tool_version = Get-ToolVersion $tool $ver_param
Add-Log $tick $tool "Added $tool $tool_version"
} else {