Skip to content

Commit

Permalink
Use pkgdir inside isolate sandbox to account for packages that have b…
Browse files Browse the repository at this point in the history
…een built with a custom PREFIX

closes #686
  • Loading branch information
Brikaa committed Sep 15, 2024
1 parent ecdced9 commit c4afd97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions api/src/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Job {
'-c',
'/box/submission',
'-e',
`--dir=/runtime=${this.runtime.pkgdir}`,
`--dir=${this.runtime.pkgdir}`,
`--dir=/etc:noexec`,
`--processes=${this.runtime.max_process_count}`,
`--open-files=${this.runtime.max_open_files}`,
Expand All @@ -171,7 +171,7 @@ class Job {
...(config.disable_networking ? [] : ['--share-net']),
'--',
'/bin/bash',
file,
path.join(this.runtime.pkgdir, file),
...args,
],
{
Expand Down Expand Up @@ -365,7 +365,7 @@ class Job {
emit_event_bus_stage('compile');
compile = await this.safe_call(
box,
'/runtime/compile',
'compile',
code_files.map(x => x.name),
this.timeouts.compile,
this.cpu_times.compile,
Expand All @@ -390,7 +390,7 @@ class Job {
emit_event_bus_stage('run');
run = await this.safe_call(
box,
'/runtime/run',
'run',
[code_files[0].name, ...this.args],
this.timeouts.run,
this.cpu_times.run,
Expand Down
1 change: 0 additions & 1 deletion api/src/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class Runtime {
.split('\n')
.map(line => line.split('=', 2))
.forEach(([key, val]) => {
val = val.replace_all(this.pkgdir, '/runtime');
this._env_vars[key.trim()] = val.trim();
});
}
Expand Down

0 comments on commit c4afd97

Please sign in to comment.