BrettMayson / HEMTT

Build System for Arma 3
http://hemtt.dev/
GNU General Public License v2.0
111 stars 39 forks source link

Can't copy from HEMTT_VFS to HEMTT_OUT in pre_build hook #783

Open DerZade opened 2 weeks ago

DerZade commented 2 weeks ago

Tools (complete and add to the following information):

Description: Example for copy does not work in pre_build hook:

let path =  HEMTT_VFS.join("docs");
if !path.exists() { throw "does not exists" }

path.copy(HEMTT_OUT.join("docs"));

Fails with:

error[BHE3]: Script /.hemtt/hooks/pre_build/02_copy_extension.rhai failed at runtime
   ┌─ .hemtt/hooks/pre_build/02_copy_extension.rhai:38:37
   │
38 │ path.copy(HEMTT_OUT.join("docs")); 
   │                                       Function not found: copy (vfs::path::VfsPath, std::path::PathBuf) (line 38, position 6)
BrettMayson commented 2 weeks ago

Hm, yeah there isn't a function that handles copying from the virtual file system to the real file system.

Can you post what your use case is? This might be better handled another way, or maybe you're just the first to hit this