Skip to content

Commit c00cee3

Browse files
committed
Merge pull request #102171 from Muller-Castro/apksigner-fix
Fix apksigner execution failure on linux
2 parents 841c29d + d702460 commit c00cee3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

platform/android/export/export_plugin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,6 +2522,13 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_
25222522
String java_sdk_path = EDITOR_GET("export/android/java_sdk_path");
25232523
if (!java_sdk_path.is_empty()) {
25242524
OS::get_singleton()->set_environment("JAVA_HOME", java_sdk_path);
2525+
2526+
#ifdef UNIX_ENABLED
2527+
String env_path = OS::get_singleton()->get_environment("PATH");
2528+
if (!env_path.contains(java_sdk_path)) {
2529+
OS::get_singleton()->set_environment("PATH", java_sdk_path + "/bin:" + env_path);
2530+
}
2531+
#endif
25252532
}
25262533

25272534
List<String> args;

0 commit comments

Comments
 (0)