Environment Variables

Environment Variables Affecting Tool Execution

Environment VariableDescription
COSMOS_DIRWindows Only. Tells the Windows .bat launcher files where to find the COSMOS Installation of Ruby. Typically set to C:\COSMOS. Expects Vendor\Ruby to exist in the directory. Is not used if Vendor\Ruby is found within two directories up of the executing .bat (typically within a COSMOS Installation)
COSMOS_USERPATHAllows scripts that run outside of your COSMOS project configuration folder to know where the project configuration folder is. Only needed if you plan on using scripts that rely on your project specific command/telemetry definitions or other configuration outside of the project folder.
COSMOS_TEXTProcess to launch for COSMOS "Open in Text Editor" buttons. Should be exactly what needs to be typed from a command line and expect a single argument of a quoted filename to open.
RUBYLIBAdds folders to the Ruby library search path.
RUBYOPTAlways passes specific command line options to the ruby interpretor
GEM_PATHProvides one or more paths to where gems may reside
GEM_HOMEProvides the location where gems will be installed
VISUALPreferred text editor used on linux if COSMOS_TEXT is not defined and gedit is not present
EDITORText editor used on linux if COSMOS_TEXT is not defined, and VISUAL is not defined, and gedit is not present
PATHPATH controls what executables are available to COSMOS when it shells out to tools. It also affects the dynamic library search on some platforms.
SystemRootWindows Only. Used to know the windows installation folder.

Environment Variables Only Affecting Development And Unit Testing

Environment VariableDescription
COSMOS_DEVELPath to a local COSMOS development area. Overrides using the gem in Gemfiles.
COSMOS_NO_SIMPLECOVIf defined runs unit tests without doing coverage.
PROFILEIf defined runs unit tests with profiling
BENCHMARKIf defined runs unit tests with benchmarking
TRAVISUsed to skip specific unit tests when running in the Travis environment
APPVEYORUsed to skip specific unit tests when running in the AppVeyor environment
VERSIONUsed to specify the COSMOS version of the gemspec and Rakefile when building COSMOS gems

Environment Variables Set By COSMOS

Environment VariableDescription
COSMOS_LOGS_DIRSet by COSMOS so that tools outside of COSMOS can know where they can put log files. Specifically used by the SegFault catching code to capture segfault logs.
COSMOS_USERPATHSet by Launcher to whatever Launcher determined the COSMOS_USERPATH to be. This ensures that all tools spawned by Launcher will user the same COSMOS_USERPATH
PATHCOSMOS adds the COSMOS gem's bin folder to the beginning of the PATH.