File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,26 @@ async function doFilesExistCheck(files: string[]): Promise<boolean> {
40
40
return true ;
41
41
}
42
42
43
+ /**
44
+ * Check if the Flashpoint installation that the given path is valid.
45
+ *
46
+ * @param flashpointPath The path where flashpoint is stored, can be relative.
47
+ * @returns true if the Flashpoint installation is valid, false it it's not.
48
+ */
49
+ export async function isFlashpointValidCheck ( flashpointPath : string ) : Promise < boolean > {
50
+ const importantFiles = getImportantFiles ( flashpointPath ) ;
51
+
52
+ return await doFilesExistCheck ( importantFiles ) ;
53
+ }
43
54
44
55
/**
45
56
* Check if php is installed on the current system. This is always true on
46
57
* Windows since php is bundled with Flashpoint.
58
+ *
59
+ * @returns true if php is installed, false if it's not. Always returns true on
60
+ * Windows.
47
61
*/
48
- async function isPhpInstalledCheck ( ) {
62
+ export async function isPhpInstalledCheck ( ) : Promise < boolean > {
49
63
if ( process . platform === 'win32' ) {
50
64
// Flashpoint bundles php on windows.
51
65
return true ;
@@ -97,10 +111,8 @@ export enum FailedCheck {
97
111
* all tests passed.
98
112
*/
99
113
export default async function checkSanity ( config : IAppConfigData ) {
100
- const importantFiles = getImportantFiles ( config . flashpointPath ) ;
101
-
102
114
const promiseArray = [
103
- doFilesExistCheck ( importantFiles ) ,
115
+ isFlashpointValidCheck ( config . flashpointPath ) ,
104
116
isPhpInstalledCheck ( ) ,
105
117
] ;
106
118
You can’t perform that action at this time.
0 commit comments