Skip to content

frontend: fix use of config/environment[.binary]

Lyndon Brown requested to merge jnqnfe/live-build:env into master

the environment variables when held in a variable need to be used via env otherwise you get command not found errors.

example:

$ echo "AA=aa" > config/environment
$ lb config
/usr/bin/lb: 83: AA=aa: not found
$ ENV="AA=aa"
$ ${ENV} true
bash: AA=aa: command not found
$ "${ENV}" true
bash: AA=aa: command not found
$ env ${ENV} true

eval is another possible solution, but i'm sure you'd agree that env is preferred


other issues exist with config environment handling in terms of multiple entries on separate lines and entries with spaces, but these are proving difficult to solve thus far. i'll hopefully push a solution separately later.

Edited by Lyndon Brown

Merge request reports

Loading