mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-28 05:49:33 +00:00
Run the command without using shell=True.
It mainly allow to run command in directory containing space. (Hello, `C:\Program Files\...`) It would also allow to work on directory containning spaces (`C:\Users\John Doe`) but xapian configure (at least) expressly doesn't support it :/ - Run the command without shell=True - The command must be a list instead of a string. - All options must also be a list (or an iterable).
This commit is contained in:
@ -223,8 +223,12 @@ class FlatpakBuilder:
|
||||
def build(self):
|
||||
log = pj(self.platform.buildEnv.log_dir, 'cmd_build_flatpak.log')
|
||||
context = Context('build', log, False)
|
||||
command = "flatpak-builder --user --ccache --force-clean --keep-build-dirs --disable-rofiles-fuse --repo=repo builddir {id}.json"
|
||||
command = command.format(id = MANIFEST['app-id'])
|
||||
command = [
|
||||
"flatpak-builder",
|
||||
"--user", "--ccache", "--force-clean", "--keep-build-dirs",
|
||||
"--disable-rofiles-fuse", "--repo=repo", "builddir",
|
||||
f"{MANIFEST['app-id']}.json"
|
||||
]
|
||||
try:
|
||||
run_command(command, self.platform.buildEnv.build_dir, context, env=self.platform.get_env())
|
||||
context._finalise()
|
||||
@ -236,8 +240,12 @@ class FlatpakBuilder:
|
||||
def bundle(self):
|
||||
log = pj(self.platform.buildEnv.log_dir, 'cmd_bundle_flatpak.log')
|
||||
context = Context('bundle', log, False)
|
||||
command = "flatpak build-bundle repo {id}.flatpak {id}"
|
||||
command = command.format(id = MANIFEST['app-id'])
|
||||
app_id = MANIFEST['app-id']
|
||||
command = [
|
||||
"flatpak", "build-bundle", "repo",
|
||||
f"{app_id}.flatpak",
|
||||
app_id
|
||||
]
|
||||
try:
|
||||
run_command(command, self.platform.buildEnv.build_dir, context, env=self.platform.get_env())
|
||||
context._finalise()
|
||||
|
Reference in New Issue
Block a user