2

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?

Piyush Mattoo
  • 15,454
  • 6
  • 47
  • 56
user3473830
  • 7,165
  • 5
  • 36
  • 52

1 Answers1

2

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

niharvey
  • 2,807
  • 2
  • 15
  • 24