Skip to content
Snippets Groups Projects
Commit 89b7b45e authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

fix(cl): improved error messages for python installation

parent 3fde4b8f
No related branches found
No related tags found
No related merge requests found
import fs from "fs/promises"; import fs from "fs/promises";
import path from "path"; import path from "path";
import { cyan, red, yellow } from "picocolors"; import { cyan, red } from "picocolors";
import { parse, stringify } from "smol-toml"; import { parse, stringify } from "smol-toml";
import terminalLink from "terminal-link"; import terminalLink from "terminal-link";
import { copy } from "./copy"; import { copy } from "./copy";
...@@ -104,18 +104,19 @@ export const installPythonDependencies = ( ...@@ -104,18 +104,19 @@ export const installPythonDependencies = (
const installSuccessful = tryPoetryInstall(noRoot); const installSuccessful = tryPoetryInstall(noRoot);
if (!installSuccessful) { if (!installSuccessful) {
console.error( console.error(
red("Install failed. Please install dependencies manually."), red(
"Installing dependencies using poetry failed. Please check error log above and try running create-llama again.",
),
); );
process.exit(1); process.exit(1);
} }
} else { } else {
console.warn( console.error(
yellow( red(
`Poetry is not available in the current environment. The Python dependencies will not be installed automatically. `Poetry is not available in the current environment. Please check ${terminalLink(
Please check ${terminalLink(
"Poetry Installation", "Poetry Installation",
`https://python-poetry.org/docs/#installation`, `https://python-poetry.org/docs/#installation`,
)} to install poetry first, then install the dependencies manually.`, )} to install poetry first, then run create-llama again.`,
), ),
); );
process.exit(1); process.exit(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment