-
Notifications
You must be signed in to change notification settings - Fork 0
RDKEMW-3106 : Ensure modules path works in all environments #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reason for change: Cleaned up the code Test Procedure: build should be successful. Risks: low Priority: P2
else{ | ||
char* cwd = getcwd(nullptr,0); | ||
std::string PWD=cwd; | ||
if(PWD=="/package") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to remove this check and need to be done via JSruntimeLauncher by setting environment variable JSRUNTIME_MODULES_PATH=/runtime/modules
PWD = "/runtime"; | ||
} | ||
sModulesPath=PWD+"/modules/"; | ||
setenv("JSRUNTIME_MODULES_PATH",sModulesPath.c_str(),1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to remove setenv also
@@ -75,9 +80,23 @@ void JavaScriptContextBase::registerCommonUtils() | |||
|
|||
std::string JavaScriptContextBase::readFile(const char *file) | |||
{ | |||
std::ifstream src_file(file); | |||
bool isModules = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to isModule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kindly look at comments
RDKEMW-3106 : Ensure modules path works in all environments
Reason for change: Cleaned up the code
Test Procedure: build should be successful.
Risks: low
Priority: P2