caddyserver / xcaddy

Build Caddy with plugins
Apache License 2.0
880 stars 105 forks source link

version after build fails #13

Closed dkebler closed 4 years ago

dkebler commented 4 years ago

After building xcaddy attempts to run the new build with version command and fails. There is nothing wrong with permissions of that binary on my system. I I assume fork/exec is some child process starter for Go? Therein lies the permission problem.

/opt/caddy2/amd64 version
2020/05/06 08:23:53 [FATAL] fork/exec /opt/caddy2/amd64: permission denied

BTW my script runs the version command afterwards fine. Is there really any reason that xcaddy needs to do this? My suggestion is to remove it if it's going to be problematic (point of confusion) for some users.

mholt commented 4 years ago

Hi David!

Is there really any reason that xcaddy needs to do this?

Not really, it is just to give you visual confirmation that the right binary was built and works. (When I do cross-platform builds, it also fails, of course, because it is built for another platform.)

I suppose we could be smarter about how/when we do that check, but in any case, it's not actually a failure, or an error that you need to worry about. We could return a different exit code maybe?

mholt commented 4 years ago

Closing due to inactivity. Feel free to continue discussion.