@@ -24,7 +24,7 @@ class OpenApiDiff {
24
24
* @param {object } options The configuration options.
25
25
*
26
26
* @param {boolean } [options.json] A boolean flag indicating whether output format of the messages is json.
27
- *
27
+ *
28
28
* @param {boolean } [options.matchApiVersion] A boolean flag indicating whether to consider api-version while comparing.
29
29
*
30
30
* @returns {object } OpenApiDiff Returns the configured OpenApiDiff object.
@@ -72,18 +72,7 @@ class OpenApiDiff {
72
72
dotNetPath ( ) {
73
73
log . silly ( `dotNetPath is being called` ) ;
74
74
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
87
76
return "dotnet" ;
88
77
}
89
78
@@ -97,13 +86,15 @@ class OpenApiDiff {
97
86
98
87
// When oad is installed globally
99
88
let result = path . join ( __dirname , ".." , ".." , "node_modules" , "autorest" , "app.js" ) ;
100
- if ( fs . existsSync ( result ) )
89
+ if ( fs . existsSync ( result ) ) {
101
90
return `node ${ result } ` ;
91
+ }
102
92
103
93
// When oad is installed locally
104
94
result = path . join ( __dirname , ".." , ".." , ".." , "autorest" , "app.js" ) ;
105
- if ( fs . existsSync ( result ) )
95
+ if ( fs . existsSync ( result ) ) {
106
96
return `node ${ result } ` ;
97
+ }
107
98
108
99
// Assume that autorest is in the path
109
100
return 'autorest' ;
0 commit comments