Skip to content
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

az.getSecret() helper for bicepparam files #10776

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update return type
HadwaAbdelhalem committed May 22, 2023
commit c10bc59085e50a01629fe3499c9d625a72b0112c
3 changes: 2 additions & 1 deletion src/Bicep.Core/Semantics/Namespaces/SystemNamespaceType.cs
Original file line number Diff line number Diff line change
@@ -1132,7 +1132,8 @@ private static FunctionResult ReadEnvironmentVariableResultBuilder (IBinder bind
{
return new(ErrorType.Create(DiagnosticBuilder.ForPosition(arguments[0]).FailedToEvaluateParameter(envVariableName, "Environment variable does not exist")));
}
return new(ConvertJsonToBicepType(envVariableValue), ConvertJsonToExpression(envVariableValue));
return new(TypeFactory.CreateStringLiteralType(envVariableValue),
new StringLiteralExpression(null, envVariableValue));
}

private static bool TryLoadTextContentFromFile(IBinder binder, IFileResolver fileResolver, IDiagnosticWriter diagnostics, (FunctionArgumentSyntax syntax, TypeSymbol typeSymbol) filePathArgument, (FunctionArgumentSyntax syntax, TypeSymbol typeSymbol)? encodingArgument, [NotNullWhen(true)] out string? fileContent, [NotNullWhen(false)] out ErrorDiagnostic? errorDiagnostic, int maxCharacters = -1)