You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anywhere Bicep accepts a path (module and import statements; load*Content functions), it must be a relative path that uses a / directory separator to ensure portability. However, this isn't very discoverable if you start out with an absolute Windows path.
paramteststring = loadTextContent('C:\<insert home path>\.ssh\id_rsa.pub')
will confusingly report that the value must be a compile time constant. Not sure what causes that, but I think \< confuses the lexer somehow. Using a path with no placeholders:
First reported by @TheOnlyWei in #15994 (reply in thread)
Anywhere Bicep accepts a path (
module
andimport
statements;load*Content
functions), it must be a relative path that uses a/
directory separator to ensure portability. However, this isn't very discoverable if you start out with an absolute Windows path.will confusingly report that the value must be a compile time constant. Not sure what causes that, but I think
\<
confuses the lexer somehow. Using a path with no placeholders:will report that the string contains illegal escape sequences. Escaping the backslashes:
will report that the string contains an illegal
:
character. Removing the drive:will finally report that the
/
directory separator needs to be used instead of\
. Replacing the directory separators:will report that paths need to be relative, not absolute.
That's a lot of iteration! Maybe we should put more guidance in earlier messages or in the
load*Content
function descriptions.The text was updated successfully, but these errors were encountered: