Incorrect type for `script_env`?
See original GitHub issueI want to pass through the SETUPTOOLS_SCM_PRETEND_VERSION
env var to the build so tried specifying it in the build.script_env
section:
build:
number: 0
script: $PYTHON -m pip install . -vv
script_env:
- SETUPTOOLS_SCM_PRETEND_VERSION
However, it seems that boa
doesn’t allow this:
Recipe validation error
['SETUPTOOLS_SCM_PRETEND_VERSION'] is not of type 'object'
Failed validating 'type' in
schema['properties']['build']['properties']['script_env']:
{'additionalProperties': {'type': 'string'},
'title': 'Script Env',
'type': 'object'}
On instance['build']['script_env']:
['SETUPTOOLS_SCM_PRETEND_VERSION']
Recipe validation not OK. This is currently ignored.
IIUC this should be allowed? https://docs.conda.io/projects/conda-build/en/latest/user-guide/environment-variables.html#inherited-environment-variables
It appears that boa
expects this to be a key/value mapping instead of an array of names whose values will be set from the calling environment.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
The syntax of the command is incorrect TYPE command
I am trying to run a script that fails. I have isolated the problem to a simple TYPE command. Here ...
Read more >v1.19.3+k3s2 doesn't work on a vagrant box as simple and ...
I have same problem. I reboot my vm and make k3s restart indefinitely. I think this is ntp time sync conflict with vm...
Read more >Bash@3 - Bash v3 task | Microsoft Learn
Bash v3 # Run a Bash script on macOS, Linux, or Windows. - task: Bash@3 inputs: #targetType: 'filePath' # 'filePath' | 'inline'. Type....
Read more >Invalid variables validation in .gitlab-ci.yml (#15338) · Issues
While validating variables map, integer values should be treated as strings. For example: variables: VARIABLE_10: 10 test1: script: - env.
Read more >Customizing the Build - Travis CI Docs
git: depth: false. YAML. Some operations on the repository, such as common automated code review scripts (e.g. Pronto for Ruby), may fail due...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having the type be an array of string where some strings may be encoded key/value pairs is a bit icky. You could maybe split it into e.g.
env.inject
andenv.pass_through
but maybe at that point it’s easier to just inject theenviron
into the context as discussed in #273.I think I’d be in favour of injecting the
environ
as it’s a more general solution and would allow me to solve 2 issues I’m facing - this one (passing through env vars) and also injecting the version into the recipe.Resolved by https://github.com/mamba-org/boa/pull/299