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
The content of a profile will be encoded in environment variables that are then passed to the Docker command.
If the profile contains a $, it will not be escaped. The shell inside the Docker container then sets these variables and tries to evaluate everything following the $ as an environment variable as well.
Inside the container the shell will treat the $compiler_version part as an undefined variable and will replace it with an empty string. That results in a profile like this:
compiler_version=7
[env]
CC=gcc-
where the version number is missing in the definition of `CC``.
Environment Details
Conan Package Tools Version: 0.35.0
Operating System: Linux
Operation System Version: Ubuntu 20.04
Compiler+version: any
Docker image: based on ubuntu:18.04
Conan version: conan 1.33.1
Python version: python 3.8.5
Steps to reproduce (Include if Applicable)
Build logs (Include if Available)
The text was updated successfully, but these errors were encountered:
I am not sure if other character in profiles can also cause problems when stored in environment variables.
Maybe this issue can be solved by switching to a different encoding. Something like BASE64 encoding should work with environment variables although it will be incompatible with the current implementation.
Description of Problem, Request, or Question
Defining and using local variables inside profiles is supported according to this link:
https://docs.conan.io/en/latest/reference/profiles.html#variable-declaration
The content of a profile will be encoded in environment variables that are then passed to the Docker command.
If the profile contains a
$
, it will not be escaped. The shell inside the Docker container then sets these variables and tries to evaluate everything following the$
as an environment variable as well.Example:
The profile
will be encoded into
Inside the container the shell will treat the
$compiler_version
part as an undefined variable and will replace it with an empty string. That results in a profile like this:where the version number is missing in the definition of `CC``.
Environment Details
Steps to reproduce (Include if Applicable)
Build logs (Include if Available)
The text was updated successfully, but these errors were encountered: