on4kjm / FLEcli

Multi-platform "Fast Log Entry"(FLE) processing tool
MIT License
32 stars 9 forks source link

when specifying an output directory that doesn't exist, error message is not user friendly #67

Closed jmMeessen closed 7 months ago

jmMeessen commented 4 years ago

./FLEcli csv -o -i test/data/fle-6-bigFile.txt test/data/output/temp/fle-6-bigFile.csv

panic: open test/data/output/temp/fle-6-bigFile.csv: no such file or directory

goroutine 1 [running]:
FLEcli/fleprocess.checkFileError(...)
    /Users/jmm/work/FLEcli/fleprocess/write_file.go:51
FLEcli/fleprocess.writeFile(0x7ffeefbff9d7, 0x27, 0xc000068000, 0x54e, 0x6a8)
    /Users/jmm/work/FLEcli/fleprocess/write_file.go:30 +0x33b
FLEcli/fleprocess.outputCsv(0x7ffeefbff9d7, 0x27, 0xc0003f8000, 0x54e, 0x640)
    /Users/jmm/work/FLEcli/fleprocess/csv_write.go:32 +0x75
FLEcli/fleprocess.ProcessCsvCommand(0x7ffeefbff9bb, 0x1b, 0x7ffeefbff9d7, 0x27, 0xc000010101, 0x119b365, 0xc00017ca00)
    /Users/jmm/work/FLEcli/fleprocess/csv_process.go:50 +0x17e
FLEcli/flecmd.glob..func2(0x166a440, 0xc000134b80, 0x2, 0x4, 0x0, 0x0)
    /Users/jmm/work/FLEcli/flecmd/csv.go:51 +0xf4
github.com/spf13/cobra.(*Command).execute(0x166a440, 0xc000132140, 0x4, 0x4, 0x166a440, 0xc000132140)
    /Users/jmm/.go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0x166a6e0, 0x104402a, 0x16370e0, 0xc00002e778)
    /Users/jmm/.go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/jmm/.go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
FLEcli/flecmd.Execute()
    /Users/jmm/work/FLEcli/flecmd/root.go:49 +0x31
main.main()
    /Users/jmm/work/FLEcli/main.go:29 +0x25
nicheath commented 8 months ago

Did the recent merge solve this issue?

jmMeessen commented 7 months ago

Yes. We can close this feature. I want to finish #118 before cutting a release. Shouldn't take long. (And in two weeks I will have less time to spend on the tool)