mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Fixed change to root privileges #152
This commit is contained in:
parent
cbd03a4a98
commit
45434a34d7
1 changed files with 7 additions and 3 deletions
|
@ -179,13 +179,17 @@ class Slackbuilds:
|
|||
def build_the_script(self, path: str, name: str):
|
||||
""" Run the .SlackBuild script. """
|
||||
folder = f'{path}/{name}/'
|
||||
slackbuild = f'./{name}.SlackBuild'
|
||||
execute = folder + slackbuild
|
||||
execute = f'{folder}./{name}.SlackBuild'
|
||||
|
||||
# Change to root privileges
|
||||
os.chown(folder, 0, 0)
|
||||
for file in os.listdir(folder):
|
||||
os.chown(f'{folder}{file}', 0, 0)
|
||||
|
||||
if '--jobs' in self.flags:
|
||||
self.set_makeflags()
|
||||
|
||||
stdout = subprocess.call(execute)
|
||||
stdout = subprocess.call(execute, shell=True)
|
||||
|
||||
if stdout > 0:
|
||||
raise SystemExit(stdout)
|
||||
|
|
Loading…
Reference in a new issue