You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

2h 9m 35s logged

I finished up mocha download, which surprisingly does a bit more than simply downloading files.

The first thing it does is well… download the file. This is a bit more complicated than it seems though, since we need to identify the right file to download based on cpu architecture. Hence the very cursed JSON parsing I had to create.

After downloading a file, we also do a hash check. We support the 4 types of file hashes which scoop support, those being sha256, sha512, md5 and sha1.

Currently files get downloaded to the $MOCHA_DIR/cache directory like in scoop, however we don’t actually check if there’s anything cached which can lead to repeated downloads. That’s something I’ll need to fix later on

0
2

Comments 0

No comments yet. Be the first!