<commit_before>$msipath = "$PSScriptRoot\node-installer.msi"

function RunCommand ($command, $command_args) {
    Write-Host $command $command_args
    Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru
}

function InstallNode () {
    DownloadNodeMSI
    InstallNodeMSI
}

function DownloadNodeMSI () {
    $url = "https://nodejs.org/dist/v8.11.4/node-v8.11.4-x64.msi"
    $start_time = Get-Date

    Write-Output "Downloading node msi"
    Invoke-WebRequest -Uri $url -OutFile $msipath
    Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
}

function InstallNodeMSI () {
    $install_args = "/qn /log node_install.log /i $msipath"
    $uninstall_args = "/qn /x $msipath"
    RunCommand "msiexec.exe" $install_args

    #if (-not(Test-Path $python_home)) {
    #    Write-Host "Python seems to be installed else-where, reinstalling."
    #    RunCommand "msiexec.exe" $uninstall_args
    #    RunCommand "msiexec.exe" $install_args
    #}
}


function main () {
    InstallNode
    rm $msipath
}

main<commit_msg>ci(appveyor): updated node to v12.18.4<commit_after>$msipath = "$PSScriptRoot\node-installer.msi"

function RunCommand ($command, $command_args) {
    Write-Host $command $command_args
    Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru
}

function InstallNode () {
    DownloadNodeMSI
    InstallNodeMSI
}

function DownloadNodeMSI () {
    $url = "https://nodejs.org/dist/v12.18.4/node-v12.18.4-x64.msi"
    $start_time = Get-Date

    Write-Output "Downloading node msi"
    Invoke-WebRequest -Uri $url -OutFile $msipath
    Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"
}

function InstallNodeMSI () {
    $install_args = "/qn /log node_install.log /i $msipath"
    $uninstall_args = "/qn /x $msipath"
    RunCommand "msiexec.exe" $install_args

    #if (-not(Test-Path $python_home)) {
    #    Write-Host "Python seems to be installed else-where, reinstalling."
    #    RunCommand "msiexec.exe" $uninstall_args
    #    RunCommand "msiexec.exe" $install_args
    #}
}


function main () {
    InstallNode
    rm $msipath
}

main
{'fraction_non_alphanumeric': 0.13035467526485492, 'fraction_numerical': 0.01243666513127591, 'mean_word_length': 3.459958932238193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5802711', 'n_tokens_mistral': 807, 'n_tokens_neox': 768, 'n_words': 159}