in variables.go [267:282]
func (e *expansionErr) eval(cfg *Config, opts *options) (string, error) {
path, err := e.left.eval(cfg, opts)
if err == nil && path != "" {
ref := newReference(parsePath(path, e.pathSep, opts.maxIdx, opts.enableNumKeys, opts.escapePath))
str, err := ref.eval(cfg, opts)
if err == nil && str != "" {
return str, nil
}
}
errStr, err := e.right.eval(cfg, opts)
if err != nil {
return "", err
}
return "", errors.New(errStr)
}