upsert not working without -c switch
Closed this issue · 4 comments
can not run upsert without -c
█ force bulk upsert
ERROR: Unknown command - upsert.
versus
██ force bulk -c=upsert
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/heroku/force/command.runBulk2(0x16f9040, 0xc4200100e0, 0x0, 0x0)
/Users/morris/go/src/github.com/heroku/force/command/bulk.go:152 +0x40d
github.com/heroku/force/command.runBulk(0x16f9040, 0xc4200100e0, 0x0, 0x0)
/Users/morris/go/src/github.com/heroku/force/command/bulk.go:210 +0x3ba
main.main()
/Users/morris/go/src/github.com/heroku/force/main.go:30 +0x2e2
any idea why https://github.com/heroku/force/blob/b95cf1de07a6d0627446cfcac9dbcd9af8996007/command/bulk.go#L151
holds a case for upsert but
https://github.com/heroku/force/blob/b95cf1de07a6d0627446cfcac9dbcd9af8996007/command/bulk.go#L223
doesn't?
I think because I wasn't thorough enough when I was working on adding upsert to the ordered bulk commands. https://github.com/ForceCLI/force/commits?author=slancio
I was using the flags version at the time to add support for concurrency modes and tried to add the upsert feature to the other version to be nice. I should have tested the other version more carefully, clearly. It should just be a matter of a simple PR to add upsert to the list like you point out, as the handleDML
function is set up to handle upserts already.
I'll give this a test tomorrow and submit the PR if it's good.
👍