File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -138,16 +138,15 @@ if (!envIsThruthy('SKIP_INTEGRITY', false)) {
138138// Cleanup tmp directory if any exists
139139cleanUp ( ) ;
140140
141- /**Check if prettier version of package.json is the same than ENV in workflow,
142- * if not set ENV equal to package.json version
141+ /**
142+ * Check if prettier version of package.json is the same than ENV in workflow
143143*/
144144const packageFile = shell . cat ( 'package.json' ) . toString ( ) ;
145145let package = JSON . parse ( packageFile ) ;
146- const packageVersion = package [ 'devDependencies' ] [ 'prettier' ]
146+ const packageVersion = package [ 'devDependencies' ] [ 'prettier' ] . replace ( / [ ^ 0 - 9 a - z A - Z . ] / g , '' )
147147
148- if ( shell . env [ 'EXERCISM_PRETTIER_VERSION' ] != packageVersion ) {
149- shell . echo ( '\n==========\nCheck prettier package.json and ENV variable match \n' ) ;
150- shell . env [ 'EXERCISM_PRETTIER_VERSION' ] = packageVersion ;
148+ if ( shell . env [ 'EXERCISM_PRETTIER_VERSION' ] !== packageVersion ) {
149+ shell . echo ( `\n==========\nWorkflow EXERCISM_PRETTIER_VERSION does not match pacakge.json prettier version ${ packageVersion } \n` ) ;
151150}
152151
153152
You can’t perform that action at this time.
0 commit comments