@@ -24,7 +24,7 @@ class OpenApiDiff {
2424 * @param {object } options The configuration options.
2525 *
2626 * @param {boolean } [options.json] A boolean flag indicating whether output format of the messages is json.
27- *
27+ *
2828 * @param {boolean } [options.matchApiVersion] A boolean flag indicating whether to consider api-version while comparing.
2929 *
3030 * @returns {object } OpenApiDiff Returns the configured OpenApiDiff object.
@@ -72,18 +72,7 @@ class OpenApiDiff {
7272 dotNetPath ( ) {
7373 log . silly ( `dotNetPath is being called` ) ;
7474
75- // try global installation directory
76- let result = path . join ( os . homedir ( ) , ".autorest" , "frameworks" , "dotnet" ) ;
77- if ( fs . existsSync ( result ) ) {
78- return result ;
79- }
80-
81- result = path . join ( os . homedir ( ) , ".autorest" , "frameworks" , "dotnet.exe" ) ;
82- if ( fs . existsSync ( result ) ) {
83- return result ;
84- }
85-
86- // hope there is one in the PATH
75+ // Assume that dotnet is in the PATH
8776 return "dotnet" ;
8877 }
8978
@@ -97,13 +86,15 @@ class OpenApiDiff {
9786
9887 // When oad is installed globally
9988 let result = path . join ( __dirname , ".." , ".." , "node_modules" , "autorest" , "app.js" ) ;
100- if ( fs . existsSync ( result ) )
89+ if ( fs . existsSync ( result ) ) {
10190 return `node ${ result } ` ;
91+ }
10292
10393 // When oad is installed locally
10494 result = path . join ( __dirname , ".." , ".." , ".." , "autorest" , "app.js" ) ;
105- if ( fs . existsSync ( result ) )
95+ if ( fs . existsSync ( result ) ) {
10696 return `node ${ result } ` ;
97+ }
10798
10899 // Assume that autorest is in the path
109100 return 'autorest' ;
0 commit comments