Skip to content

Commit

Permalink
Set LANG environment variable when running commands on IPhoneBuilder …
Browse files Browse the repository at this point in the history
…to fix issue with cocoapods.
  • Loading branch information
shannah committed Apr 21, 2022
1 parent f010d82 commit 79a8e37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public abstract class Executor {
private boolean unitTestMode;
private String platform;
static boolean IS_MAC;
protected final Map<String,String> defaultEnvironment = new HashMap<String,String>();



Expand Down Expand Up @@ -1474,6 +1475,7 @@ public String execStringWithThrow(boolean withThrow, File dir, String... varArgs

StringBuilder response = new StringBuilder();
ProcessBuilder p = new ProcessBuilder(varArgs).directory(dir);
p.environment().putAll(defaultEnvironment);
int val = executeProcess(p, -1, response);
if (val != 0) {
if (withThrow) {
Expand Down Expand Up @@ -1573,6 +1575,7 @@ public boolean exec(File dir, File javaHome, int timeout, Map<String, String> en
}

ProcessBuilder p = new ProcessBuilder(varArgs).directory(dir);
p.environment().putAll(defaultEnvironment);
if (env != null) {
p.environment().putAll(env);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ private int getDeploymentTargetInt(BuildRequest request) {

@Override
public boolean build(File sourceZip, BuildRequest request) throws BuildException {
defaultEnvironment.put("LANG", "en_US.UTF-8");
tmpFile = tmpDir = getBuildDirectory();
useMetal = "true".equals(request.getArg("ios.metal", "false"));
try {
Expand Down

0 comments on commit 79a8e37

Please sign in to comment.