mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-26 23:12:09 +02:00
Fix bug where reading stdin would cause the install to hang
This commit is contained in:
parent
f337d7affd
commit
d255131d68
@ -407,11 +407,11 @@ func ImportHistory(ctx *context.Context) (int, error) {
|
||||
return 0, fmt.Errorf("failed to parse zsh history: %v", err)
|
||||
}
|
||||
historyEntries = append(historyEntries, extraEntries...)
|
||||
extraEntries, err = readStdin()
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to read stdin: %v", err)
|
||||
}
|
||||
historyEntries = append(historyEntries, extraEntries...)
|
||||
// extraEntries, err = readStdin()
|
||||
// if err != nil {
|
||||
// return 0, fmt.Errorf("failed to read stdin: %v", err)
|
||||
// }
|
||||
// historyEntries = append(historyEntries, extraEntries...)
|
||||
db := hctx.GetDb(ctx)
|
||||
currentUser, err := user.Current()
|
||||
if err != nil {
|
||||
|
@ -73,6 +73,7 @@ func main() {
|
||||
case "install":
|
||||
lib.CheckFatalError(lib.Install())
|
||||
if os.Getenv("HISHTORY_TEST") == "" {
|
||||
fmt.Println("Importing existing shell history...")
|
||||
ctx := hctx.MakeContext()
|
||||
numImported, err := lib.ImportHistory(ctx)
|
||||
lib.CheckFatalError(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user