Skip to content

Commit 8bfcc38

Browse files
allouisacburdine
authored andcommitted
fix(utils): prerelease statisfies engine definition
When testing installs with a prerelease version of the CLI the satisfy check against Ghosts engines field in package.json fails.
1 parent d0a8ad8 commit 8bfcc38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const utils = {
166166
return Promise.reject(new SystemError('Zip file contains a Ghost version incompatible with the current Node version.'));
167167
}
168168

169-
if (pkg.engines && pkg.engines.cli && !semver.satisfies(cliPackage.version, pkg.engines.cli)) {
169+
if (pkg.engines && pkg.engines.cli && !semver.satisfies(cliPackage.version, pkg.engines.cli, {includePrerelease: true})) {
170170
return Promise.reject(new SystemError({
171171
message: 'Zip file contains a Ghost version incompatible with this version of the CLI.',
172172
help: `Required: v${pkg.engines.cli}, current: v${cliPackage.version}`,

0 commit comments

Comments
 (0)