Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[toolchain]
channel = "1.97.0"
components = ["rustfmt", "clippy"]

# aarch64-apple-darwin comes from .github/workflows/component-artifacts.yml.
# rustup treats stable and 1.97.0 as different toolchains, so targets a workflow
# installs for stable are absent here. Removing this target strips the macOS
# arm64 cross-compile job while reading as a pure version change.
targets = ["aarch64-apple-darwin"]
15 changes: 8 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde_json::{json, Value};
use std::env;
use std::fs;
use std::io::{self, Read};
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::thread;
use std::time::Duration;

Expand Down Expand Up @@ -1488,8 +1488,8 @@ fn onboard(cli: &Cli, args: &OnboardArgs) -> Result<(), String> {
&project_ref,
value,
args.with_ci_workflow,
workflow_path.as_ref(),
manifest_path.as_ref(),
workflow_path.as_deref(),
manifest_path.as_deref(),
variables_outcome,
next,
);
Expand All @@ -1514,13 +1514,14 @@ fn onboard_error_body(value: Option<&Value>, text: &str) -> String {
value.map_or_else(|| text.to_string(), Value::to_string)
}

#[allow(clippy::too_many_arguments)]
fn onboard_output(
repo: &str,
project_ref: &str,
onboard: Value,
ci_workflow: bool,
workflow_path: Option<&PathBuf>,
manifest_path: Option<&PathBuf>,
workflow_path: Option<&Path>,
manifest_path: Option<&Path>,
variables: Value,
next: &str,
) -> (Value, String) {
Expand Down Expand Up @@ -2771,10 +2772,10 @@ mod tests {
use super::*;
use clap::CommandFactory;

fn access_args_for(file: &PathBuf) -> AccessApplyArgs {
fn access_args_for(file: &Path) -> AccessApplyArgs {
AccessApplyArgs {
repo_dir: None,
file: Some(file.clone()),
file: Some(file.to_path_buf()),
app_ref: None,
tenant_ref: None,
account_ref: None,
Expand Down
Loading