Skip to content

Declaring tag to inject a value for a tool command? #2732

Answered by verdverm
deepbrook asked this question in Q&A
Discussion options

You must be logged in to vote

The following works for me, ran: cue cmd -t fname=tony member-imports foo_tool.cue

import (
	"tool/file"
	"tool/cli"
	"encoding/yaml"
	"encoding/json"
	"team-config/schema"
)

#args: {
	fname: string @tag(fname)
}

command: "member-imports": {
	cli.Print & {text: #args.fname}
}

Can you get this working as well? (by putting it in an isolated environment / directory / module)

Best if we can reduce until it works and then add back to see what is the cause

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@deepbrook
Comment options

@deepbrook
Comment options

@eonpatapon
Comment options

Answer selected by deepbrook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants