Skip to content

quote MAKE to prevent path expansion with space error#18622

Merged
zeripath merged 2 commits into
go-gitea:mainfrom
AllSpiceIO:kd/quote_makepath
Feb 5, 2022
Merged

quote MAKE to prevent path expansion with space error#18622
zeripath merged 2 commits into
go-gitea:mainfrom
AllSpiceIO:kd/quote_makepath

Conversation

@kdumontnu
Copy link
Copy Markdown
Contributor

Pretty minor change to prevent error when $(MAKE) path is expanded with a space in the path.

$ TAGS="bindata sqlite sqlite_unlock_notify" make build
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `C:/Program Files (x86)/GnuWin32/bin/make -v | head -n 1'

I believe Program Files (x86) is the default path for GNU make on windows

@singuliere singuliere added this to the 1.17.0 milestone Feb 5, 2022
Copy link
Copy Markdown
Contributor

@singuliere singuliere left a comment

Choose a reason for hiding this comment

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

After reading the GNU/make manual page this change looks fine. I was concerned that the variable also includes options in some cases but I was mistaken 👍

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 5, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 5, 2022
@zeripath zeripath merged commit a51d211 into go-gitea:main Feb 5, 2022
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Pretty minor change to prevent error when `$(MAKE)` path is expanded with a space in the path. 

```bash
$ TAGS="bindata sqlite sqlite_unlock_notify" make build
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `C:/Program Files (x86)/GnuWin32/bin/make -v | head -n 1'
```

I believe Program Files (x86) is the default path for GNU make on windows
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants