Commit dc777bc1 authored by Jérome Perrin's avatar Jérome Perrin

theia: set $TMPDIR when installing

installing vscode-ripgrep creates a folder in temporary directory, but
never removes it.

On our test nodes it was observed that a first testnode running installs
and create this folder in /tmp/ then another testnode running as another
unix user installs and we had this error:

    Command: node ./lib/postinstall.js
    Arguments:
    Directory: /srv/slapgrid/slappart13/srv/testnode/cqg/inst/test0-0/tmp/soft/c3f3d686d3e77f9e5c20a555a2698c98/parts/theia/node_modules/vscode-ripgrep
    Output:
    Finding release for v11.0.1-2
    GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v11.0.1-2
    Downloading from https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/assets/13800816
    Downloading to /tmp/vscode-ripgrep-cache-1.5.7/ripgrep-v11.0.1-2-x86_64-unknown-linux-musl.tar.gz
    Download options: {"headers":{"user-agent":"vscode-ripgrep","accept":"application/octet-stream"}}
    events.js:167
        throw er; // Unhandled 'error' event
        ^

    Error: EACCES: permission denied, open '/tmp/vscode-ripgrep-cache-1.5.7/ripgrep-v11.0.1-2-x86_64-unknown-linux-musl.tar.gz'
    Emitted 'error' event at:
        at fs.open (internal/fs/streams.js:250:12)
        at FSReqWrap.oncomplete (fs.js:145:20)
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    theia: Non zero exit code (1) while running command.
    While:
    Installing theia.
    Error: Non zero exit code (1) while running command.

/reviewed-on !668
parent ad61c8d2
...@@ -60,8 +60,9 @@ mode = 0644 ...@@ -60,8 +60,9 @@ mode = 0644
[theia] [theia]
recipe = plone.recipe.command recipe = plone.recipe.command
command = ${bash:location}/bin/bash -c " command = ${bash:location}/bin/bash -c "
export PATH=${nodejs:location}/bin/:${python2.7:location}/bin/:$PATH && export TMPDIR=${:location}/tmp PATH=${nodejs:location}/bin/:${python2.7:location}/bin/:$PATH &&
mkdir -p ${:location} && \ mkdir -p ${:location} && \
mkdir -p \$TMPDIR && \
cd ${:location} && \ cd ${:location} && \
cp ${package.json:rendered} . && cp ${package.json:rendered} . &&
cp ${yarn.lock:output} . && cp ${yarn.lock:output} . &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment