Skip to content

Commit 0be149b

Browse files
authored
fix: don't try to delete .git if it's not present
When using `--opt source_mode=copy` with a custom `.dockerignore` that excludes the `.git` directory from the docker build context, the `rmdir .git` command fails with `The system cannot find the file specified.` since docker does not have that directory in context. This patch avoids this scenario with a simple existence check.
1 parent 5547ec9 commit 0be149b

File tree

1 file changed

+1
-1
lines changed
  • ue4docker/dockerfiles/ue4-minimal/windows

1 file changed

+1
-1
lines changed

ue4docker/dockerfiles/ue4-minimal/windows/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY set-changelist.py C:\set-changelist.py
1414
RUN python C:\set-changelist.py C:\UnrealEngine\Engine\Build\Build.version %CHANGELIST%
1515

1616
# Remove the .git directory to disable UBT `git status` calls and speed up the build process
17-
RUN rmdir /s /q C:\UnrealEngine\.git
17+
RUN if exist C:\UnrealEngine\.git rmdir /s /q C:\UnrealEngine\.git
1818

1919
{% if (not disable_all_patches) and (not disable_buildgraph_patches) %}
2020
# Patch out problematic entries in InstalledEngineFilters.xml introduced in UE4.20.0

0 commit comments

Comments
 (0)