You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./answer build --output myanswer --with github.com/apache/answer-plugins/connector-basic
try to build a new answer with plugins:
[...]
[go build -ldflags -X github.com/apache/answer/cmd.Version=1.4.2 -X github.com/apache/answer/cmd.Revision=0fd7e81 -X github.com/apache/answer/cmd.Time=2025-02-06T08:31:57Z -o myanswer .]
build new answer successfully myanswer
$ ls -la
// there is no `myanswer`
If I don't specify --output parameter or if I specify full path --output /tmp/myanswer then it works.
Let me explain it. When build new answer with plugin, it will create a dir firstly, such like answer_build1980106637. All following command will be execute in this temp dir. So if you use the relative path, such as ./new_answer, the new binary will be put to answer_build1980106637/new_answer. After building the temp dir will be removed, so the binary will be clean too. In order not to cause misunderstanding, it is better to use the absolute path directly to ensure the correct output of the product.
That's totally unintuitive, no one would use absolute path without knowing about this issue. At first I thought that --output didn't work at all and only later I realized it works with absolute path.
So I would say that's just workaround to this issue.
Describe the bug
Using
answer build --output name
option binary is not actually created.To Reproduce
Download and unpack https://github.com/apache/answer/releases/download/v1.4.2/apache-answer-1.4.2-bin-linux-amd64.tar.gz
If I don't specify
--output
parameter or if I specify full path--output /tmp/myanswer
then it works.Expected behavior
myanswer
to existPlatform
The text was updated successfully, but these errors were encountered: