Skip to content

Commit a2fdaa1

Browse files
committed
Removed hard-coded ghost version check when validating themes
no issue - it's easy to miss/forget the hard-coded gscan version check when bumping major versions - switched to reading the real Ghost version and using that to pass the check version to gscan
1 parent 566b718 commit a2fdaa1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ghost/core/core/server/services/themes/validate.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const check = async function check(themeName, theme, options = {}) {
4848
debug('Begin: Check');
4949
// gscan can slow down boot time if we require on boot, for now nest the require.
5050
const gscan = require('gscan');
51-
const checkedVersion = 'v5';
51+
const ghostVersion = require('@tryghost/version');
52+
const checkedVersion = `v${ghostVersion.safe.split('.')[0]}`;
5253
let checkedTheme;
5354

5455
if (options.isZip === true) {

0 commit comments

Comments
 (0)