Skip to content

Add ".exe" to windows executable path if it is not explicitly set#4

Merged
markbates merged 1 commit intomarkbates:masterfrom
marpaia:buffalo-169
Jan 24, 2017
Merged

Add ".exe" to windows executable path if it is not explicitly set#4
markbates merged 1 commit intomarkbates:masterfrom
marpaia:buffalo-169

Conversation

@marpaia
Copy link
Contributor

@marpaia marpaia commented Jan 24, 2017

This is a fix for gobuffalo/buffalo#169.

@markbates markbates merged commit 874338f into markbates:master Jan 24, 2017
@markbates
Copy link
Owner

Thanks!!

@marpaia marpaia deleted the buffalo-169 branch January 24, 2017 16:19
Copy link
Collaborator

@nathany nathany left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.


func (c *Configuration) FullBuildPath() string {
return path.Join(c.BuildPath, c.BinaryName)
path := path.Join(c.BuildPath, c.BinaryName)
Copy link
Collaborator

Choose a reason for hiding this comment

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

path may not be the best variable name, given the use of the path package as well (a bit ambiguous)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, yeah, this is a really good call. I can submit another PR to resolve this?

return path.Join(c.BuildPath, c.BinaryName)
path := path.Join(c.BuildPath, c.BinaryName)
if runtime.GOOS == "windows" {
if !strings.HasSuffix(path, ".exe") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this may not be a big issue, but do note that HasSuffix is case sensitive (e.g. resulting in app.EXE.exe)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can submit a new PR to lower the string first.

Copy link
Owner

Choose a reason for hiding this comment

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

If you open a pr to handle the case and change the path variable to something else would be great.

@nathany
Copy link
Collaborator

nathany commented Jan 24, 2017

Whoops, looks like I'm too late to the party. That @markbates is fast! ;-)

markbates added a commit that referenced this pull request Jan 24, 2017
Addressing review comments from #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants