hashicorp/packer · error
No '=' value in arg: %s
Error message
No '=' value in arg: %s
What it means
CLI flag parsing error from the -var key=value flag parser: the argument contains no '=' separator, so it cannot be split into a variable name and value. Detected via strings.Index(raw, "=") returning -1.
Source
Thrown at command/flag-kv/flag.go:22
package kvflag
import (
"fmt"
"strings"
)
// Flag is a flag.Value implementation for parsing user variables
// from the command-line in the format of '-var key=value'.
type Flag map[string]string
func (v *Flag) String() string {
return ""
}
func (v *Flag) Set(raw string) error {
idx := strings.Index(raw, "=")
if idx == -1 {
return fmt.Errorf("No '=' value in arg: %s", raw)
}
if *v == nil {
*v = make(map[string]string)
}
key, value := raw[0:idx], raw[idx+1:]
(*v)[key] = value
return nil
}
View on GitHub (pinned to eb36e3c3e4)
Solutions
- Rewrite the argument as -var key=value with an equals sign
- Quote the whole flag if the value contains spaces: -var "key=some value"
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at command/flag-kv/flag.go:22 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/packer@eb36e3c3e4 (2026-09-05).
Data as JSON: /api/errors/bea0d1cd45a83bf2.
Report an issue: GitHub.