Pergunta

I'm using a pre_start action hook to add some new paths to the PATH and LD_LIBRARY_PATH environment.

after git push I can see that variables are updated, however when I ssh to the server, added variables are not available, after some googling I found out this is happening because these variables are exported as a sub-shell.

openshift documentations suggest to add variables using set-env command, but when run it I get following error

rhc set-env PATH=$OPENSHIFT_DATA_DIR/bin:$PATH" -a srv
Setting environment variable(s) ... PATH cannot be overridden

Does anybody know how we can overcome this?

Foi útil?

Solução

If I'm guessing correctly at what you're ultimately trying to accomplish, your trying to write your own cartridge. Recently we just added a new environment variable OPENSHIFT_yourcartname_LD_LIBRARY_PATH_ELEMENT. You can use this environment variable to configure the location of each cartridge's library files

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top