This repository was archived by the owner on Sep 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11use crate :: utils:: prompt:: { automated, manual} ;
2- use std:: { path:: Path , process} ;
32use semver:: { Version , VersionReq } ;
3+ use std:: { path:: Path , process} ;
44
55pub fn run ( dir : & Path , dry_run : bool ) {
66 let npm_version_command = process:: Command :: new ( "node" )
7- . arg ( "--version" )
8- . output ( )
9- . expect ( "Could not check node version" ) ;
7+ . arg ( "--version" )
8+ . output ( )
9+ . expect ( "Could not check node version" ) ;
1010
1111 let stdout_result = String :: from_utf8 ( npm_version_command. stdout ) . unwrap ( ) ;
12-
1312 let req = VersionReq :: parse ( ">=14.0.0" ) . unwrap ( ) ;
14-
1513 let version = Version :: parse ( & stdout_result[ 1 ..stdout_result. len ( ) ] . trim ( ) ) . unwrap ( ) ;
1614
17- if !req. matches ( & version) {
18- panic ! ( "Guides can only be installed with node version 14 and above right now. you have {:?}" , stdout_result)
15+ if !req. matches ( & version) {
16+ panic ! (
17+ "Guides can only be installed with node version 14 and above right now. you have {:?}" ,
18+ stdout_result
19+ )
1920 }
2021
2122 manual ( "Check for pending PRs: https://github.com/ember-learn/guides-source/pulls" ) ;
@@ -35,7 +36,6 @@ pub fn run(dir: &Path, dry_run: bool) {
3536 if !status. success ( ) {
3637 panic ! ( "npm install failed" ) ;
3738 }
38-
3939 }
4040
4141 automated ( "Creating new version of guides" ) ;
You can’t perform that action at this time.
0 commit comments