Enable rustfmt-nightly to pass the filter

rustfmt-nightly was forked from rustfmt 0.9 and its
version numbering has been reset to 0.1.0.
This commit updates the version check to reject rustfmt only
if its 0.[1-4].x version is not follwed by '-nightly' suffix.
This commit is contained in:
Cyril Plisko 2017-07-16 15:55:20 +03:00
parent 065f9d4a30
commit 3ba6b0ac56
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Next # Next
- Fixes #1638. update type-formatter and Fixes indent size not supported - Fixes #1638. update type-formatter and Fixes indent size not supported
- Add support for rustfmt-nightly
# v0.30.4 (2017-07-14) # v0.30.4 (2017-07-14)
- Fixes #1732. Improve deprecation message for old options for new Executables - Fixes #1732. Improve deprecation message for old options for new Executables

View File

@ -34,7 +34,7 @@ module.exports = class Rustfmt extends Beautifier
else else
@run(program, ["--version"], help: help) @run(program, ["--version"], help: help)
.then((stdout) -> .then((stdout) ->
if /^0\.(?:[0-4]\.[0-9])/.test(stdout.trim()) if /^0\.(?:[0-4]\.[0-9])(?!-nightly)/.test(stdout.trim())
versionCheckState = false versionCheckState = false
throw new Error("rustfmt version 0.5.0 or newer required") throw new Error("rustfmt version 0.5.0 or newer required")
else else