achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
5.01k stars 273 forks source link

Shell completion files cannot be generated without network access #268

Closed clausecker closed 5 months ago

clausecker commented 6 months ago

I'm the maintainer of the FreeBSD package for this project.

On FreeBSD, we build binary packages in an isolated environment using the Poudriere utility. After fetching source code, network access is turned off for the rest of the build. While this used to work fine for this project, the build now fails when we try to generate shell completion files post build:

/wrkdirs/usr/ports/finance/ticker/work/bin/ticker completion bash  | tee /wrkdirs/usr/ports/finance/ticker/work/stage/usr/local/etc/bash_completion.d/ticker                                                                                  
error requesting a cookie: Get "https://finance.yahoo.com/": dial tcp: lookup finance.yahoo.com on [2001:67c:1400:800:53::1]:53: dial udp [2001:67c:1400:800:53::1]:53: connect: can't assign requested address

Please check why network accesses are being made even when just creating shell completion files and if possible ensure shell completion files can still be generated when no network access is possible.

achannarasappa commented 6 months ago

Thanks for reporting this issue! ticker had to be modified to generate a session cookie with Yahoo via a series of network calls on startup which is the likely cause of this. Previously, no network calls were made on startup which allowed the use case you described to work. I had not considered this use case before but I'll have a look into whether this can be refactored to make the network call later to allow for this use case.

achannarasappa commented 5 months ago

The latest release should address this issue but feel free to reopen if it's not resolved.

clausecker commented 5 months ago

Thanks!