You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is really cool. Thanks for all your work!
I have followed some related issues (#80) to capture the output, which working fine in some simple cases.
But it seems not work if I sending some args together.
// OKlg.callMain(["log"])// NO OUTPUTlg.callMain(["log","-p"])
Full snippet:
constlg=require('./node_modules/wasm-git/lg2.js');letstdout;lg["print"]=function(text){console.log(text);}lg["printErr"]=function(text){console.error(text);}lg.onRuntimeInitialized=()=>{constFS=lg.FS;constNODEFS=FS.filesystems.NODEFS;FS.mkdir('/working');FS.mount(NODEFS,{root: '..'},'/working');FS.chdir('/working');constgitConfigContent='[user]\n'+'name = Test User\n'+'email = [email protected]\n'+'[safe]\ndirectory = *\n';FS.writeFile('/home/web_user/.gitconfig',gitConfigContent,(err)=>{if(err)throwerr;console.log('File has been saved!');});console.log(FS.readdir('.'));// OKlg.callMain(["log"])// NO OUTPUTlg.callMain(["log","-p"])};
The text was updated successfully, but these errors were encountered:
Can you try compiling the libgit2 examples directly ( as native, not as Wasm ) and see if the -p switch works there? Either it's missing in the example from libgit2, or it might not work when used in Wasm ( but I doubt that ). For everything that I've been missing from the libgit2 examples, I've added to the libgit2patchedfiles/examples folder, but as you can see I haven't patched the log command. It comes directly out of libgit2.
This project is really cool. Thanks for all your work!
I have followed some related issues (#80) to capture the output, which working fine in some simple cases.
But it seems not work if I sending some args together.
Full snippet:
The text was updated successfully, but these errors were encountered: