-
-
Notifications
You must be signed in to change notification settings - Fork 7
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
choose.From assignment mismatch #47
Comments
If
It then works fine. For some reason, before you have all the modules installed, The error happens here, in the choose.From() assignment, on the default switch: Call: func(x *Z.Cmd, args ...string) error {
if !term.IsInteractive() {
return titleCmd.Call(x, args...)
}
keg, err := current(x.Caller)
if err != nil {
return err
}
id := args[0]
if id == "last" {
if n := Last(keg.Path); n != nil {
id = n.ID()
}
} else {
_, err := strconv.Atoi(id)
if err != nil {
dex, err := ReadDex(keg.Path)
if err != nil {
return err
}
key := strings.Join(args, " ")
hits := dex.WithTitleText(key)
switch len(hits) {
case 1:
id = strconv.Itoa(hits[0].N)
case 0:
return fmt.Errorf("no titles match: %v", key)
default:
i, _, err := choose.From(hits.PrettyLines())
if err != nil {
return err
}
if i < 0 {
return nil
}
id = strconv.Itoa(hits[i].N)
}
}
}
path := filepath.Join(keg.Path, id, `README.md`)
if !fs.Exists(path) {
return fmt.Errorf("content node (%s) does not exist in %q", id, keg.Name)
}
if err := file.Edit(path); err != nil {
return err
}
if err := MakeDex(keg.Path); err != nil {
return err
}
return Publish(keg.Path)
}, |
Your instructions didn't work, however if I edit |
The issue is resolved. He updated the |
Everything is working. Closing the issue. |
When installing both
keg@latest
andkn@latest
I get the following errorThe text was updated successfully, but these errors were encountered: