mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 21:14:15 +02:00
[fix][web] not able to launch applications for the root user
This commit is contained in:
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from bauh.api.abstract.model import SoftwarePackage
|
||||
from bauh.commons import resource
|
||||
from bauh.commons import resource, user
|
||||
from bauh.gems.web import ROOT_DIR
|
||||
|
||||
|
||||
@@ -47,6 +47,10 @@ class WebApplication(SoftwarePackage):
|
||||
if self.installation_dir:
|
||||
return '{}/{}'.format(self.installation_dir, self.id)
|
||||
|
||||
def get_command(self) -> str:
|
||||
if self.installation_dir:
|
||||
return '{}{}'.format(self.get_exec_path(), '--no-sandbox' if user.is_root() else '')
|
||||
|
||||
def get_type(self):
|
||||
return 'web'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user