Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 CLI args not parsed when secret env is not defined #7181

Open
skycaptain opened this issue Apr 24, 2024 · 1 comment
Open

馃悶 CLI args not parsed when secret env is not defined #7181

skycaptain opened this issue Apr 24, 2024 · 1 comment
Labels
area/cli All about go code on dagger CLI kind/bug Something isn't working

Comments

@skycaptain
Copy link
Contributor

What is the issue?

I have a module, where using credentials is optional, e.g.

import dagger
from dagger import function, object_type

@object_type
class Test:
    username: str | None = None
    token: dagger.Secret | None = None

    name: str | None = None

    @function
    def call(self) -> str:
        return f"Hello, {self.name}!"

When I call this module like this, I get a valid response:

$ MY_TOKEN="very_secret_variable" dagger call -m test --token=env:MY_TOKEN --name "World" call
Hello, World!

However, when token is missing, it seems that the CLI is stopping parsing the other arguments:

$ dagger call -m test --token=env:MY_TOKEN --name "World" call
Hello, None!

Dagger version

dagger v0.11.1 (registry.dagger.io/engine) darwin/arm64

Steps to reproduce

See above.

Log output

No response

@helderco
Copy link
Contributor

That's an interesting find, thanks for reporting! 馃

@helderco helderco added kind/bug Something isn't working area/cli All about go code on dagger CLI labels Apr 24, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli All about go code on dagger CLI kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants