fix: lp: config set - must excl path
This commit is contained in:
parent
6c68ba1315
commit
2d192c485c
@ -7,6 +7,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
@ -84,7 +85,7 @@ var configSetCmd = &cli.Command{
|
|||||||
return fmt.Errorf("cannot open file %s: %w", args.First(), err)
|
return fmt.Errorf("cannot open file %s: %w", args.First(), err)
|
||||||
}
|
}
|
||||||
if name == "" {
|
if name == "" {
|
||||||
name = strings.Split(args.First(), ".")[0]
|
name = strings.Split(path.Base(args.First()), ".")[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bytes, err := io.ReadAll(stream)
|
bytes, err := io.ReadAll(stream)
|
||||||
|
Loading…
Reference in New Issue
Block a user