Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

nuv -info and -version should only report version and exit #361

Closed
d4rkstar opened this issue Jun 2, 2024 · 1 comment · May be fixed by nuvolaris/nuv#116
Closed

nuv -info and -version should only report version and exit #361

d4rkstar opened this issue Jun 2, 2024 · 1 comment · May be fixed by nuvolaris/nuv#116
Assignees

Comments

@d4rkstar
Copy link

d4rkstar commented Jun 2, 2024

Hello,
i wrote a test for nuv nix package.

However, when running the test, nuv command will ALWAYS try to download olaris and in nix sandbox this is not allowed.

Testing if nuv is version 3.0.1-beta.2405292059
Welcome to nuv! Setting up...
failed to clone olaris on branch '3.0.0'
error: Get "http://github.com/nuvolaris/olaris/info/refs?service=git-upload-pack": dial tcp: lookup github.com on [::1]:53: read udp [::1]:40060->[::1]:53: read: connection refused
--- /dev/fd/63  2024-06-02 16:26:49.224455033 +0000
+++ /dev/fd/62  2024-06-02 16:26:49.224455033 +0000
@@ -1 +1 @@
-Cloning tasks...
+3.0.1-beta.2405292059
error: builder for '/nix/store/h7ysrxkbwpha46wgiklb9ympap1rnfly-nuv-test-run.drv' failed with exit code 1;
       last 9 log lines:
       > Testing if nuv is version 3.0.1-beta.2405292059
       > Welcome to nuv! Setting up...
       > failed to clone olaris on branch '3.0.0'
       > error: Get "http://github.com/nuvolaris/olaris/info/refs?service=git-upload-pack": dial tcp: lookup github.com on [::1]:53: read udp [::1]:40060->[::1]:53: read: connection refused
       > --- /dev/fd/63     2024-06-02 16:26:49.224455033 +0000
       > +++ /dev/fd/62     2024-06-02 16:26:49.224455033 +0000

I need a way to avoid that the nuv command, when invoked with -version or -info, will download olaris: it should only report the version.

I can contribute a patch, but need to know if we should use a command switch or an environment variable.

d4rkstar added a commit to d4rkstar/nuv that referenced this issue Jun 2, 2024
moved the code that checks these arguments before the olaris checks. Should resolve nuvolaris/nuvolaris#361
@d4rkstar d4rkstar self-assigned this Jun 2, 2024
@d4rkstar d4rkstar assigned giusdp and unassigned d4rkstar Jun 2, 2024
@sciabarracom
Copy link
Contributor

Solved in ops

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants