Compare commits

...

5 Commits

Author SHA1 Message Date
Thomas Schönauer
d8748b004b Update check-and-lint.yaml 2022-11-03 19:40:24 +00:00
Thomas Schönauer
16953409fd Get windows to finish clippy without errors (#133)
* Changes windows get_wsl_distribution argument

* changes in get_wsl_distributions

* changes in run_wsl_topgrade due to clippy errors
2022-11-03 19:34:27 +00:00
Thomas Schönauer
c85adb8980 Update check-and-lint.yaml 2022-11-03 19:19:00 +00:00
Thomas Schönauer
91554cac56 GitHub action cleanup2 (#132)
* Changed clippy args for PR pipeline

* changes crates-publish toolchain version to stable

* Enhanced clippy for PRs

* Fixes typo
2022-11-03 19:09:44 +00:00
Thomas Schönauer
7256aaffc8 Resolve clippy errors (#131)
* Resolves clippy errors

* Fixes clippy errors

* Changes get_wsl_distributions arguments from pointer to value
2022-11-03 19:04:06 +00:00
2 changed files with 9 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ name: Check and Lint
jobs:
check:
name: Check
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
@@ -26,6 +27,7 @@ jobs:
fmt:
name: Rustfmt
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
@@ -44,6 +46,7 @@ jobs:
clippy:
name: Clippy
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
@@ -54,13 +57,13 @@ jobs:
toolchain: stable
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
- uses: actions-rs/cargo@v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: clippy
args: --all-targets --locked -- -D warnings
name: Clippy Output
- uses: actions-rs/clippy-check@v1
- uses: actions-rs/cargo@v1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: clippy
args: --all-targets --locked --all-features -- -D warnings
name: Clippy (All features) Output

View File

@@ -66,7 +66,7 @@ pub fn run_scoop(cleanup: bool, run_type: RunType) -> Result<()> {
}
fn get_wsl_distributions(wsl: &Path) -> Result<Vec<String>> {
let output = Command::new(wsl).args(["--list", "-q"]).check_output()?;
let output = Command::new(&wsl).args(["--list", "-q"]).check_output()?;
Ok(output
.lines()
.filter(|s| !s.is_empty())
@@ -94,7 +94,7 @@ fn upgrade_wsl_distribution(wsl: &Path, dist: &str, ctx: &ExecutionContext) -> R
pub fn run_wsl_topgrade(ctx: &ExecutionContext) -> Result<()> {
let wsl = require("wsl")?;
let wsl_distributions = get_wsl_distributions(wsl)?;
let wsl_distributions = get_wsl_distributions(&wsl)?;
let mut ran = false;
debug!("WSL distributions: {:?}", wsl_distributions);