metalbear-co / mirrord

Connect your local process and your cloud environment, and run local code in cloud conditions.
https://mirrord.dev
MIT License
3.81k stars 104 forks source link

open doesn't pass flags on Go + Linux #2614

Open aviramha opened 3 months ago

aviramha commented 3 months ago

Probably we don't pass args from the open syscall. Happens when using local (but probably can affect remote as well)

fd, err := os.OpenFile("/tmp/myfile.txt", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
  panic(err)
}
defer fd.Close()
aviramha commented 3 months ago

Note the hack we did with open (where it accept varargs) - I recall we had an issue with macOS not working well there so probably need similar implementation.