@@ -688,13 +688,13 @@ function chassis(callback) {
688
688
exec ( 'ioreg -c IOPlatformExpertDevice -d 2' , function ( error , stdout ) {
689
689
if ( ! error ) {
690
690
let lines = stdout . toString ( ) . replace ( / [ < > " ] / g, '' ) . split ( '\n' ) ;
691
- const model = util . getValue ( lines , 'model' , '=' , true ) ;
692
- const modelParts = util . splitByNumber ( model ) ;
693
- const version = util . getValue ( lines , 'version' , '=' , true ) ;
691
+ const model = util . getAppleModel ( util . getValue ( lines , 'model' , '=' , true ) ) ;
692
+ // const modelParts = util.splitByNumber(model);
693
+ // const version = util.getValue(lines, 'version', '=', true);
694
694
result . manufacturer = util . getValue ( lines , 'manufacturer' , '=' , true ) ;
695
- result . model = version ? util . getValue ( lines , ' model' , '=' , true ) : modelParts [ 0 ] ;
696
- result . type = macOsChassisType ( result . model ) ;
697
- result . version = version || model ;
695
+ result . model = model . model ;
696
+ result . type = macOsChassisType ( model . model ) ;
697
+ result . version = model . version ;
698
698
result . serial = util . getValue ( lines , 'ioplatformserialnumber' , '=' , true ) ;
699
699
result . assetTag = util . getValue ( lines , 'board-id' , '=' , true ) || util . getValue ( lines , 'target-type' , '=' , true ) ;
700
700
result . sku = util . getValue ( lines , 'target-sub-type' , '=' , true ) ;
0 commit comments