<commit_before>﻿$deployToolsDir = Split-Path ((Get-Variable MyInvocation -Scope 0).Value.MyCommand.Path)

if (Test-Path variable:\OctopusParameters)
{
    foreach($kp in $OctopusParameters.GetEnumerator())
    {
        if (!($kp -like '*Octopus.Step*'))
        {
            Set-Content ("env:\" + $kp.Key) ($kp.Value) -Force
        }
    }
}

if(!(Test-Path "env:\ConfigOnly"))
{
    Set-Content "env:\ConfigOnly" $false
}

function ensconce
{
    if (@($input).Count -ne 0)
    {
        $input.Reset()
        $results = $input | & "$deployToolsDir\ensconce.exe" $args
    }
    else {
        $results = & "$deployToolsDir\ensconce.exe" $args<commit_msg>Update the setting of environment variables from the OctopusParameter set to tak account of arrays in Octopus 2<commit_after>﻿$deployToolsDir = Split-Path ((Get-Variable MyInvocation -Scope 0).Value.MyCommand.Path)

if (Test-Path variable:\OctopusParameters)
{
    foreach($kp in $OctopusParameters.GetEnumerator())
    {
        if (!($kp -like '*Octopus.Step*'))
        {
            Set-Content ("env:\" + $kp.Key.replace("[","-").replace("]","")) ($kp.Value) -Force
        }
    }
}

if(!(Test-Path "env:\ConfigOnly"))
{
    Set-Content "env:\ConfigOnly" $false
}

function ensconce
{
    if (@($input).Count -ne 0)
    {
        $input.Reset()
        $results = $input | & "$deployToolsDir\ensconce.exe" $args
    }
    else {
        $results = & "$deployToolsDir\ensconce.exe" $args
{'fraction_non_alphanumeric': 0.17136958017894013, 'fraction_numerical': 0.0034411562284927736, 'mean_word_length': 2.7963446475195823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6222697', 'n_tokens_mistral': 516, 'n_tokens_neox': 483, 'n_words': 98}