From 80c98dba7385a5483eb73a85d4ae9e743a5f8d75 Mon Sep 17 00:00:00 2001 From: Pavel Stsefanovich Date: Mon, 20 Dec 2021 22:29:21 -0600 Subject: [PATCH] Fix for quotes in the user input --- scripts/generate_module_manifest.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/generate_module_manifest.ps1 b/scripts/generate_module_manifest.ps1 index 3dd74fd..3f5926e 100644 --- a/scripts/generate_module_manifest.ps1 +++ b/scripts/generate_module_manifest.ps1 @@ -114,14 +114,14 @@ if (! $skip_manifest_update) { foreach ($item in $user_input_strings) { $value = $null info " ? $item`: " -no_newline - $value = Read-Host + $value = (Read-Host).Replace("'", '"') if ($value.Trim().Length -gt 0) { $manifest.$item = $value } } foreach ($item in $user_input_lists) { $value = $null info " ? $item` (comma-separated): " -no_newline - $value = Read-Host + $value = (Read-Host).Replace("'", '"') if ($value.Trim().Length -gt 0) { $manifest.$item = @($value.Split(',') | % {$_.Trim()}) } } @@ -189,7 +189,7 @@ if (! $skip_manifest_update) { foreach ($item in $user_update_strings) { $value = $null info " ? $item`: " -no_newline - $value = Read-Host + $value = (Read-Host).Replace("'", '"') if ($value.Trim().Length -gt 0) { $manifest.$item = $value } } @@ -203,6 +203,7 @@ if (! $skip_manifest_update) { } $command += " -$key '$($manifest.$key)'" } + write-host $command -ForegroundColor Magenta iex $command info "done" -success }