()
| 28 | } |
| 29 | |
| 30 | export 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 | } |
no test coverage detected