aboutsummaryrefslogtreecommitdiff
path: root/src/download.c
Commit message (Collapse)AuthorAgeFilesLines
* Refactor directory structureJoseph Hunkeler2024-10-141-61/+0
| | | | | * Move core library sources into src/lib/core * Move command-line programs into src/cli
* Unit tests (#12)Joseph Hunkeler2024-07-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change return value of conda_setup_headless() from void to int * Replace exit() with return; * Return early if unpacking the micromamba binary fails * Exit program when pointer to INIFILE is NULL. * Validation function cannot otherwise proceed * The way the logic is set up I've decided to duplicate the installation code for now until I find time to revise it * The only meaningful difference between a "fresh start" and reusing the conda installation is a rmtree(). * Exposes STASIS_DOWNLOAD_TIMEOUT environment variable * Sets the connection timeout for libcurl to 30, instead of 300. * Export ini_section_create() function * Add download() tests * Add conda_*() tests * Add boilerplate source file for test framework * Fixes segfault reported by @GeorgeJCleary (#10) * The key is now an array index. When key is -1, the env variable is not defined. * Free resources only when continue on error is disabled (#11) * Fix segfault due to premature shutdown/cleanup * If conda_setup_headless cannot succeed, die * Set STASIS_SYSCONFDIR for tests
* Rebrand OhMyCal (OMC) as STASIS (#7)Joseph Hunkeler2024-06-211-1/+1
|
* Fix return code from download()Joseph Hunkeler2024-04-151-4/+6
| | | | | * Will return -1 on error * Still returns HTTP code if error is server-side
* Improve download()Joseph Hunkeler2024-02-061-3/+14
| | | | | * Returns HTTP status code * Emits curl error message to stderr (or to a buffer if the third argument is not NULL)
* Add user-agent to downloaderJoseph Hunkeler2023-12-101-2/+6
| | | | * Fix invalid type passed to CURLOPT_FOLLOWLOCATION
* Initial commitJoseph Hunkeler2023-10-261-0/+34