Skip to content

Commit

Permalink
remove sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasgriffin committed Nov 9, 2024
1 parent da168d3 commit 96043ee
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def build_windows_exe_and_installer_docker(
no_cache=no_cache,
build_commit=build_commit,
)

def build_in_docker(
self,
docker_image: str,
Expand All @@ -171,7 +171,7 @@ def build_in_docker(
BUILD_UID = PROJECT_ROOT.stat().st_uid
BUILD_CACHEDIR = path_build / ".cache"
original_dir = os.getcwd()

# Initialize DOCKER_BUILD_FLAGS
DOCKER_BUILD_FLAGS = ""

Expand Down Expand Up @@ -218,12 +218,6 @@ def build_in_docker(
Source_Dist_dir = PROJECT_ROOT_OR_FRESHCLONE_ROOT / build_folder / "dist"

logger.info("Building binary...")
# Check UID and possibly chown
if build_commit:
if os.getuid() != 1000 or os.getgid() != 1000:
logger.info("Need to chown -R FRESH_CLONE directory. Prompting for sudo.")
run_local(f'sudo chown -R 1000:1000 "{FRESH_CLONE}"')

run_local(
f"docker run -it "
f"--name {docker_image}-container "
Expand Down

0 comments on commit 96043ee

Please sign in to comment.