improved command line argument handling

This commit is contained in:
milarin 2023-04-07 15:24:39 +02:00
parent c2a36c3d31
commit 281287937e

View File

@ -80,7 +80,6 @@ func Convert(inputFilePath string) {
}
outputFilePath := fmt.Sprintf("%s.pdf", filepath.Base(inputFilePath)[:len(inputFilePath)-len(filepath.Ext(inputFilePath))])
fmt.Println(outputFilePath)
args := append([]string{"--output", outputFilePath}, tempFiles...)
img2pdf := exec.Command("img2pdf", args...)
@ -93,4 +92,6 @@ func Convert(inputFilePath string) {
ColorRed.Fprintf(os.Stderr, "img2pdf returned an error: %s\n", err.Error())
os.Exit(1)
}
fmt.Println(outputFilePath)
}