-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconstants.ts
More file actions
43 lines (37 loc) · 1.27 KB
/
constants.ts
File metadata and controls
43 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { homedir, platform } from "node:os";
import { join } from "node:path";
export const LOCAL_CLI_INSTALLATION_DIRNAME = join(
homedir(),
".local",
"localstack",
);
const systemDrive = process.env.SystemDrive || "C:";
export const GLOBAL_CLI_INSTALLATION_DIRNAME = join(
systemDrive,
"Program Files",
"localstack",
);
const CLI_UNIX_PATHS = [
// The local installation path takes precedence.
join(LOCAL_CLI_INSTALLATION_DIRNAME, "localstack"),
// Check if it's in the PATH.
"localstack",
// Common installation paths.
join("/", "usr", "bin", "localstack"),
join("/", "usr", "local", "bin", "localstack"),
join("/", "opt", "homebrew", "bin", "localstack"),
join("/", "home", "linuxbrew", ".linuxbrew", "bin", "localstack"),
join(homedir(), ".linuxbrew", "bin", "localstack"),
join(homedir(), ".local", "bin", "localstack"),
];
const CLI_WINDOWS_PATHS = [
// The local installation path takes precedence.
join(LOCAL_CLI_INSTALLATION_DIRNAME, "localstack.exe"),
// Check if it's in the PATH.
"localstack.exe",
// Common installation paths.
join(GLOBAL_CLI_INSTALLATION_DIRNAME, "localstack", "localstack.exe"),
];
export const CLI_PATHS =
platform() === "win32" ? CLI_WINDOWS_PATHS : CLI_UNIX_PATHS;
export const LOCALSTACK_DOCKER_IMAGE_NAME = "localstack/localstack-pro";