Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bubblejail/bwrap_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

from collections.abc import Generator
from os import environ
from os import environ, path
from pathlib import Path
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -143,7 +143,7 @@ class BwrapRawArgs(BwrapConfigBase):

def __init__(self, raw_args: list[str]):
super().__init__()
self.raw_args = raw_args
self.raw_args = list(map(path.expandvars, raw_args))

def to_args(self) -> Generator[str, None, None]:
yield from self.raw_args
Expand Down
6 changes: 3 additions & 3 deletions src/bubblejail/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from enum import auto as enum_auto
from functools import cache
from multiprocessing import Process
from os import O_CLOEXEC, O_NONBLOCK, environ, getpid, getuid, pipe2, readlink
from os import O_CLOEXEC, O_NONBLOCK, environ, getpid, getuid, path, pipe2, readlink
from pathlib import Path
from shutil import which
from sys import stderr
Expand Down Expand Up @@ -722,9 +722,9 @@ def iter_bwrap_options(self) -> ServiceGeneratorType:

for x in all_paths:
if x in read_write_paths:
yield Bind(x)
yield Bind(path.expandvars(x))
elif x in read_only_paths:
yield ReadOnlyBind(x)
yield ReadOnlyBind(path.expandvars(x))
else:
raise ValueError

Expand Down