File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ module.exports = function( Release ) {
22
33Release . define ( {
44 gitLog : function ( format ) {
5- var command = "git log " + Release . prevVersion + ".." + Release . newVersion + " " +
6- " --format=\"" + format + "\"" ,
5+ var commitRange = Release . prevVersion + ".." + Release . newVersion ,
6+ gitLog = "git log --format=\"" + format + "\" " + commitRange ,
77 result = Release . exec ( {
8- command : command ,
8+ command : gitLog ,
99 silent : true
10- } , "Error getting git log, command was: " + command ) ;
10+ } , "Error getting git log, command was: " + gitLog ) ;
1111
1212 result = result . split ( / \r ? \n / ) ;
1313 if ( result [ result . length - 1 ] === "" ) {
Original file line number Diff line number Diff line change 1- var chalk = require ( "chalk" ) ,
2- shell = require ( "shelljs" ) ;
1+ var chalk = require ( "chalk" ) ;
32
43module . exports = function ( Release ) {
54 Release . define ( {
@@ -17,7 +16,7 @@ module.exports = function( Release ) {
1716 } ,
1817
1918 _getNpmOwners : function ( npmPackage ) {
20- var result = shell . exec ( "npm owner ls " + npmPackage , { silent : true } ) ;
19+ var result = Release . rawExec ( "npm owner ls " + npmPackage , { silent : true } ) ;
2120 if ( result . code !== 0 ) {
2221
2322 // The npm package may not exist yet
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ var shell = require( "shelljs" ),
44module . exports = function ( Release ) {
55
66Release . define ( {
7+ rawExec : function ( command , options ) {
8+ return shell . exec ( command , options ) ;
9+ } ,
10+
711 exec : function ( _options , errorMessage ) {
812 var result ,
913 command = _options . command || _options ,
@@ -15,7 +19,7 @@ Release.define({
1519
1620 errorMessage = errorMessage || "Error executing command: " + command ;
1721
18- result = shell . exec ( command , options ) ;
22+ result = Release . rawExec ( command , options ) ;
1923 if ( result . code !== 0 ) {
2024 Release . abort ( errorMessage ) ;
2125 }
You can’t perform that action at this time.
0 commit comments