Skip to content

Commit ff47540

Browse files
committed
add devShell check
1 parent 2de100e commit ff47540

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

packages/cli/src/commands/install-cluster-command.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ export class InstallClusterCommand extends Command {
3333
"Starting Panfactum cluster installation process...\n"
3434
);
3535

36+
// Check if they're using the devShell
37+
const devShell = process.env["PF_DEVSHELL"] === "1";
38+
if (!devShell) {
39+
this.context.stderr.write(
40+
pc.red(
41+
"ERROR: It appears you're not running this installer in the Panfactum devShell.\n" +
42+
"Please ensure you've completed the initial setup steps in the guide here:\n" +
43+
"https://panfactum.com/docs/edge/guides/bootstrapping/installing-devshell#integrate-the-panfactum-devshell"
44+
)
45+
);
46+
printHelpInformation(this.context);
47+
return 1;
48+
}
49+
3650
// If there's no panfactum.yaml they need to complete the initial setup steps
3751
const currentDirectory = process.cwd();
3852
const panfactumYamlPath = await findPanfactumYaml(currentDirectory);
@@ -56,7 +70,10 @@ export class InstallClusterCommand extends Command {
5670
environmentsDir = panfactumConfig.environments_dir;
5771
}
5872

59-
if (typeof environmentsDir !== "string" || typeof environmentsDir !== "number") {
73+
if (
74+
typeof environmentsDir !== "string" ||
75+
typeof environmentsDir !== "number"
76+
) {
6077
this.context.stderr.write(
6178
pc.red(
6279
"ERROR: environments_dir not defined in panfactum.yaml.\n" +

packages/reference/environments/development/us-east-1/.tmp-panfactum-install-config.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)