File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,19 @@ var inputHelpers = {
4141 */
4242 readline . moveCursor ( process . stdout , 0 , - 1 ) ;
4343 return v ;
44+ } ,
45+ isFalsyString : function ( v ) {
46+ if ( typeof v !== 'string' ) return false ;
47+ switch ( v . trim ( ) ) {
48+ case '' :
49+ case 'N' :
50+ case 'n' :
51+ case 'false' :
52+ case 'null' :
53+ case 'undefined' :
54+ case '0' :
55+ return true ;
56+ }
4457 }
4558} ;
4659
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ function checkForUpdates(callback) {
142142function doUpdate ( data ) {
143143 async . series ( [
144144 function upgradeAuthoring ( cb ) {
145- if ( ! data . adapt_authoring ) {
145+ if ( installHelpers . inputHelpers . isFalsyString ( data . adapt_authoring ) ) {
146146 return cb ( ) ;
147147 }
148148 installHelpers . updateAuthoring ( {
@@ -159,7 +159,7 @@ function doUpdate(data) {
159159 } ) ;
160160 } ,
161161 function upgradeFramework ( cb ) {
162- if ( ! data . adapt_framework ) {
162+ if ( installHelpers . inputHelpers . isFalsyString ( data . adapt_framework ) ) {
163163 return cb ( ) ;
164164 }
165165 var dir = path . join ( configuration . tempDir , configuration . getConfig ( 'masterTenantID' ) , OutputConstants . Folders . Framework ) ;
You can’t perform that action at this time.
0 commit comments