-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Users/prmutn/specifylocationnode #2465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @preetsaimutneja, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
tl.error(tl.loc('VstestNotFound', vsVersion)); | ||
defer.resolve(1); | ||
return defer.promise; | ||
if (vstestLocationMethod == "version") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=== instead of ==
always use toLowercase and compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split into multiple functions. not more than 10 lines for function
Patch no. in task.json needs to be incremented by 1 |
vstestLocation = path.join(vsCommon, "..\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe"); | ||
} else if (vstestLocationMethod == "location") { | ||
try { | ||
fs.accessSync(vstestLocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fs.accessSync throw error if File Doesn't exist? if yes then file not there and access denied will lead to same error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually. you should use tl.exists()
there is already lib function.
rest looks good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this change
defer.resolve(1); | ||
return defer.promise; | ||
if (vstestLocationMethod.toLowerCase() === 'version') { | ||
let vsCommon = tl.getVariable("VS" + vsVersion + "0COMNTools"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be separate method
|
merge the conflicts. |
Allow users to specify vstest.console.exe path.