Skip to content

Commit 45d3992

Browse files
qfaiCopilot
andcommitted
fix(fx-core): accept newer 'Can't determine project language' output from func
Azure Functions Core Tools >= 4.0.6280 changed its no-project hint from 'Unable to find project root' to 'Can't determine project language from files'. Latent assertion in funcTool.it.ts only matched the old text; the env-checker CI gate (triggered only on deps-checker PRs) caught it. Accept either message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1af4747 commit 45d3992

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

packages/fx-core/tests/component/deps-checker/cases/funcTool.it.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,14 @@ describe("FuncToolChecker E2E Test", async () => {
233233

234234
async function assertFuncStart(binFolder?: string): Promise<void> {
235235
const funcStartResult = await funcUtils.funcStart(binFolder);
236-
// func start can work: "Unable to find project root. Expecting to find one of host.json, local.settings.json in project root."
237-
expect(funcStartResult.cmdOutputIncludingStderr).to.includes(
238-
"Unable to find project root",
239-
`func start should return error message that contains "Unable to find project root", but actual output: "${funcStartResult.cmdOutputIncludingStderr}"`
240-
);
236+
// func start can work: prints a usage / no-project hint when there's no project in cwd.
237+
// Older func versions printed "Unable to find project root";
238+
// func >= 4.0.6280 (approx) prints "Can't determine project language from files".
239+
// Either output signals the binary is runnable.
240+
const out = funcStartResult.cmdOutputIncludingStderr;
241+
expect(
242+
out.includes("Unable to find project root") ||
243+
out.includes("Can't determine project language"),
244+
`func start should return a no-project hint message, but actual output: "${out}"`
245+
).to.be.true;
241246
}

0 commit comments

Comments
 (0)