Skip to content

Commit 3a37d6f

Browse files
authored
Fix mac integration function tools path (Azure#533)
* fix mac integration function tools path * Update test/Integration/IntegrationTestBase.cs
1 parent 3e156b8 commit 3a37d6f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/Integration/IntegrationTestBase.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,16 @@ private static string GetFunctionsCoreToolsPath()
269269
}
270270
throw new FileNotFoundException($"Azure Function Core Tools not found at {funcPath} or {programFilesFuncPath}");
271271
}
272+
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
273+
{
274+
// Search Mac to see if brew installed location has azure function core tools
275+
string usrBinFuncPath = Path.Combine("/usr", "local", "bin", "func");
276+
if (File.Exists(usrBinFuncPath))
277+
{
278+
return usrBinFuncPath;
279+
}
280+
throw new FileNotFoundException($"Azure Function Core Tools not found at {funcPath} or {usrBinFuncPath}");
281+
}
272282
throw new FileNotFoundException($"Azure Function Core Tools not found at {funcPath}");
273283
}
274284

0 commit comments

Comments
 (0)