Skip to content

Commit

Permalink
Fix Windows build. Also, configure CI. (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
imunproductive authored Sep 27, 2024
1 parent c25743a commit 27678c7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-ubuntu:
name: Build on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Build examples
run: cargo build --verbose --examples
- name: Run tests
run: cargo test --verbose
build-windows:
name: Build on Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Build examples
run: cargo build --verbose --examples
- name: Run tests
run: cargo test --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use clientele::*;

#### [`StandardOptions`]

```
```text
Options:
--color <COLOR> Set the color output mode [default: auto] [possible values: auto, always, never]
-d, --debug Enable debugging output
Expand Down
6 changes: 3 additions & 3 deletions lib/clientele/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

extern crate std;

use std::{env::ArgsOs, ffi::OsString, vec::Vec};
use std::{ffi::OsString, vec::Vec};

pub fn args_os() -> Result<Vec<OsString>, std::io::Error> {
#[cfg(not(feature = "wild"))]
let args: ArgsOs = std::env::args_os();
let args = std::env::args_os();
#[cfg(feature = "wild")]
let args: ArgsOs = wild::args_os();
let args = wild::args_os();

#[cfg(not(feature = "argfile"))]
return Ok(args.collect());
Expand Down

0 comments on commit 27678c7

Please sign in to comment.