Skip to content

Commit

Permalink
Fix unit unsandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Jul 14, 2024
1 parent 75fd429 commit 94141a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/executor/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ class UnitExecutor {
return result;
}
unsandbox(config) {
if (!config) {
if (!config || !config.working_directory) {
return {};
}
let parts = config.stdout.split('/');
return {
app_start_command: config.arguments[2],
app_root: parts.slice(2).join('/'),
app_root: config.working_directory.split('/').slice(2).join('/'),
env_var_list: Object.entries(config.environment || {}).map(([k, v]) => `${k}=${v}`)
}
}
Expand Down

0 comments on commit 94141a4

Please sign in to comment.