Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-borusewicz committed Feb 8, 2025
1 parent 28f218e commit 4cca108
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ func main() {
func run_for_files(files []string) {
for _, file := range files {
fmt.Println("Exporting file", file)
no_cue_filename := S.TrimSuffix(file, ".cue")
extension := path.Ext(no_cue_filename)
out_format, extension_mapped := extension_out_map[extension]
if !extension_mapped {
out_format = "text"
}
export_command, _ := cmd.New([]string{"export", file, "--out", out_format, "--outfile", no_cue_filename, "--force"})
result := export_command.Execute()
if result != nil {
fmt.Println("Error - could not export file", file)
panic(result)
}
}
no_cue_filename := S.TrimSuffix(file, ".cue")
extension := path.Ext(no_cue_filename)
out_format, extension_mapped := extension_out_map[extension]
if !extension_mapped {
out_format = "text"
}
export_command, _ := cmd.New([]string{"export", file, "--out", out_format, "--outfile", no_cue_filename, "--force"})
result := export_command.Execute()
if result != nil {
fmt.Println("Error - could not export file", file)
panic(result)
}
}
}

0 comments on commit 4cca108

Please sign in to comment.