Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Fix gopath bin location search and error in error line parsing in windows #46

Merged
merged 2 commits into from
Nov 20, 2015
Merged

Conversation

pcmind
Copy link
Contributor

@pcmind pcmind commented Nov 20, 2015

I request to merge to correction tested for windows plugin usage.
First bin path extraction from gopath should be consistent, and in windows it is required to test file with it's extension
Build tool will emit errors like: myfile.go:4:6: expected 'STRING', found newline
where 4 is the line number and not 6

@lukehoban
Copy link
Contributor

Looks good - thanks for the fixes.

lukehoban added a commit that referenced this pull request Nov 20, 2015
Fix gopath bin location search and error in error line parsing in windows
@lukehoban lukehoban merged commit bf61793 into microsoft:master Nov 20, 2015
@lukehoban
Copy link
Contributor

Fixes #19.

@@ -27,6 +28,13 @@ export function getBinPath(binname) {
return path.join(process.env["GOPATH"], "bin", binname);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workspaces will always be of .length > 0 and if no bin is found returning ws1:ws2/bin/name makes no sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would you suggest instead? Perhaps just return binname and rely on finding it in PATH?

Edit: Actually that won't work by itself since we use the returned path in calls to fs.existsSync.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving it on PATH would make sense.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants