Skip to content

Commit 54c4786

Browse files
committed
chmod +x all binaries on Linux before app start
1 parent 56c0376 commit 54c4786

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Assets/Scripts/AppStarter.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,15 @@ private void StartLinuxApplication()
112112

113113
DebugLogger.Log(string.Format("Found executable {0}", appFilePath));
114114

115-
Chmod(appFilePath, "+x");
115+
foreach (var fileName in _app.LocalMetaData.GetRegisteredEntries())
116+
{
117+
string filePath = _app.LocalDirectory.Path.PathCombine(fileName);
118+
119+
if (MagicBytes.IsLinuxExecutable(filePath))
120+
{
121+
Chmod(filePath, "+x");
122+
}
123+
}
116124

117125
var processStartInfo = new ProcessStartInfo
118126
{

0 commit comments

Comments
 (0)