QuantumQ
Denoβ€’3y agoβ€’
10 replies
Quantum

How to get the path to the compiled binary?

import.meta.url and Deno.mainModule are used to get the current script, but after a binary is created, those get frozen to the script at the time that the compile was performed. Moving the binary somewhere else gives you the same (now wrong) result when import.meta.url or Deno.mainModule get called.
Was this page helpful?