# Verify that def with --force works

# First time should simply succeed
exec cue def -o test.cue file.cue
cmp test.cue file.cue

# Second time will fail without --force
! exec cue def -o test.cue file.cue
stderr 'error writing "test.cue": file already exists'

# Second time with --force should succeed
exec cue def --force -o test.cue file.cue
cmp test.cue file.cue

-- file.cue --
package hello

#who:    "World"
message: "Hello \(#who)!"
