-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postprovision.ps1 breaks when values contains '=', such as an AppInsights connection string containing (IngestionEndpoint= and LiveEndpoint=) #5
Comments
curious, were you planning on submitting a pull request inclusive of application insights? |
yeah, that was my idea |
cc @jongio on what he'd suggest as the safest way to terminate strings like that on the incoming. thanks for the contribution idea, let's get it in there. any chance you could optimize for making the app produce a nice app map, too? |
the app insights, I can make a pr on that, but don't have access to the preview 3 packages, should I request to merge into '02-end'? |
@pascostefan - Can you test this?
|
@jongio hi, yes tested, and it worked for me 👍 |
Cool, do you want to do a PR with that code or should I? |
Please do 👍 |
Here: #10 |
A solution could be something like this perhaps?
foreach ($line in $lines) {
$index = $line.IndexOf('=')
$name = $line.Substring(0, $index)
$value = $line.Substring($index + 1)
$value = $value.Replace('"', '')
$name = $name.Replace('__', '')
if ($value -ne '') {
dotnet user-secrets set $name $value | Out-Null
}
}
The text was updated successfully, but these errors were encountered: