Commit 817891c Edward Wu
committed
1 parent 136b796 commit 817891c Copy full SHA for 817891c
File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ public function checkAll() {
275
275
$ this ->checkDrupalVm ();
276
276
$ this ->checkSimpleSamlPhp ();
277
277
$ this ->checkPhpDateTimezone ();
278
+ $ this ->checkNodeVersionFileExists ();
278
279
279
280
ksort ($ this ->statusTable );
280
281
$ this ->printArrayAsTable ($ this ->statusTable );
@@ -1120,4 +1121,19 @@ protected function checkPhpDateTimezone() {
1120
1121
}
1121
1122
}
1122
1123
1124
+ /**
1125
+ * Checks that one of .nvmrc or .node-version exists in repo root.
1126
+ */
1127
+ protected function checkNodeVersionFileExists () {
1128
+ if (file_exists ($ this ->repoRoot . '/.nvmrc ' )) {
1129
+ $ this ->logOutcome (__FUNCTION__ , ".nvmrc file exists " , 'info ' );
1130
+ }
1131
+ elseif (file_exists ($ this ->repoRoot . '/.node-version ' )) {
1132
+ $ this ->logOutcome (__FUNCTION__ , ".node-version file exists " , 'info ' );
1133
+ }
1134
+ else {
1135
+ $ this ->logOutcome (__FUNCTION__ , "Neither .nvmrc nor .node-version file found in repo root. " , 'error ' );
1136
+ }
1137
+ }
1138
+
1123
1139
}
You can’t perform that action at this time.
0 commit comments