Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jan
kresus
Commits
45b56b56
Commit
45b56b56
authored
Sep 27, 2016
by
Benjamin Bouvier
Browse files
Fixes #460: Pass EXECJS_RUNTIME and PATH when calling into python;
parent
a2d6d432
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/lib/sources/weboob.js
View file @
45b56b56
...
...
@@ -24,10 +24,15 @@ function callWeboob(command, access) {
let
serverRoot
=
path
.
join
(
__filename
,
'
..
'
,
'
..
'
,
'
..
'
);
// Set up the environment.
let
env
=
{};
if
(
process
.
env
.
KRESUS_WEBOOB_DIR
)
env
.
WEBOOB_DIR
=
process
.
env
.
KRESUS_WEBOOB_DIR
;
// Variables for PyExecJS, necessary for the Paypal module.
env
.
PATH
=
process
.
env
.
PATH
;
env
.
EXECJS_RUNTIME
=
process
.
env
.
EXECJS_RUNTIME
||
'
Node
'
;
let
script
=
spawn
(
`./weboob/main.py`
,
[],
{
cwd
:
serverRoot
,
env
});
script
.
stdin
.
write
(
`
${
command
}
\n`
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment