Skip to content

Variables defined in a submodule should be overridable on the command line #2119

@lisongmin

Description

@lisongmin

I have following justfile in the same directory:

var.just

compose_provider := 'podman'

test.just

import 'var.just'

show:
  @echo "compose_provider is {{ compose_provider }}"

Justfile

import 'var.just'
mod test 'test.just'

show:
  @echo "compose_provider is {{compose_provider}}"

And when i set the compose_provider from command line, the show recipe in the Justfile is changed as expect

❯ just --unstable compose_provider=nerdctl show
compose_provider is nerdctl

but the show recipe in the test module always show the default value

❯ just --unstable compose_provider=nerdctl test show
compose_provider is podman

The just version is 1.27.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions