mirror of
https://github.com/FliegendeWurst/KIT-ILIAS-downloader.git
synced 2024-08-28 04:04:18 +00:00
Fix colors on windows
This commit is contained in:
parent
e397ecf73b
commit
dd37cc9d91
@ -19,7 +19,7 @@ $ cargo install --all-features --path .
|
||||
|
||||
## Usage
|
||||
|
||||
First, open a terminal (use Powershell on Windows).
|
||||
First, open a terminal. Navigate to the directory that contains the downloaded binary.
|
||||
|
||||
Use `-o <directory>` to specify the download directory:
|
||||
|
||||
@ -78,7 +78,8 @@ OPTIONS:
|
||||
|
||||
### Credentials
|
||||
|
||||
You can use the `--user` and `--keyring` options to get/store the password using the system password store:
|
||||
You can use the `--user` and `--keyring` options to get/store the password using the system password store.
|
||||
If you use Linux, you'll have to compile from source to be able to use this option.
|
||||
```
|
||||
$ KIT-ILIAS-downloader -U uabcd --keyring [...]
|
||||
```
|
||||
|
2
build.sh
2
build.sh
@ -6,5 +6,5 @@ strip target/release/KIT-ILIAS-downloader
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
# if on Debian or similar
|
||||
sudo apt install mingw-w64
|
||||
cargo build --release --target x86_64-pc-windows-gnu
|
||||
cargo build --release --all-features --target x86_64-pc-windows-gnu
|
||||
strip target/x86_64-pc-windows-gnu/release/KIT-ILIAS-downloader
|
||||
|
@ -81,6 +81,8 @@ macro_rules! error {
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let mut opt = Opt::from_args();
|
||||
#[cfg(windows)]
|
||||
colored::control::set_virtual_terminal(true);
|
||||
// use UNC paths on Windows
|
||||
opt.output = fs::canonicalize(opt.output).await.expect("failed to canonicalize directory");
|
||||
LOG_LEVEL.store(opt.verbose, Ordering::SeqCst);
|
||||
|
Loading…
Reference in New Issue
Block a user