rage / tmc-cli-rust

CLI for students using the TestMyCode programming assignment evaluator.
https://tmc.mooc.fi/
Apache License 2.0
8 stars 1 forks source link

How to control where courses are downloaded in Mac OS #23

Closed robskrob closed 1 year ago

robskrob commented 1 year ago

When I go to download a course (ex: Java Programming 1), why are the courses downloaded at this location in my file system?

/Users/johndoe/Library/Application Support/tmc/tmc_cli_rust

After running tmc download I would expect that the courses would be written to the present working directory of where the cli command is executed. For example if I run, tmc download from /Users/johndoe/mooc/helsinki/java-part-one, then I'd expect the course to exist at /Users/johndoe/mooc/helsinki/java-part-one/mooc-java-programming-i and not at:

/Users/johndoe/Library/Application\ Support/tmc/tmc_cli_rust/mooc-java-programming-i/

I have a Mac, Monterey 12.5.1. I installed tmc in my "home" directory (/Users/johndoe/) with:

    curl -0 https://raw.githubusercontent.com/rage/tmc-cli-rust/main/scripts/install.sh | bash -s x86_64 mac

As recommended in the documentation, I then created the shell alias:

    echo "alias tmc='~/tmc-cli-rust-x86_64-apple-darwin-v1.1.1'" >> "$HOME/.zshrc"
Heliozoa commented 1 year ago

Hi, By default, all exercises are stored in a centralised location so that the tool can locate them easily for updates and other operations. The download and update commands have a --currentdir (or -d) flag that uses the working directory instead.