MCPcopy Create free account
hub / github.com/Snapchat/Valdi / beginEnvironmentSetup

Function beginEnvironmentSetup

npm_modules/cli/src/setup/setupEntryPoint.ts:30–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30export async function beginEnvironmentSetup(): Promise<number> {
31 const os = getOSType();
32 const returnCode = 0;
33
34 switch (os) {
35 case OSType.MACOS: {
36 console.log(wrapInColor('Setting up development environment for MacOS...', ANSI_COLORS.BLUE_COLOR));
37 await macOSSetup();
38 break;
39 }
40 case OSType.WINDOWS: {
41 console.log(wrapInColor('Windows is not a supported operating system...aborting...', ANSI_COLORS.RED_COLOR));
42 return 1;
43 }
44 case OSType.LINUX: {
45 console.log(wrapInColor('Setting up development environment for Linux...', ANSI_COLORS.BLUE_COLOR));
46 await linuxSetup();
47 break;
48 }
49 default: {
50 console.log(
51 wrapInColor(
52 'Could not determine current operating system, skipping automated environment setup...',
53 ANSI_COLORS.RED_COLOR,
54 ),
55 );
56 console.log(
57 'Please see https://github.com/Snapchat/Valdi/blob/main/docs/INSTALL.md for manual setup instructions.',
58 );
59 return 1;
60 }
61 }
62
63 return returnCode;
64}

Callers 1

valdiSetupFunction · 0.90

Calls 5

wrapInColorFunction · 0.90
macOSSetupFunction · 0.90
linuxSetupFunction · 0.90
getOSTypeFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected