Skip to content

Commit

Permalink
reformat (#135)
Browse files Browse the repository at this point in the history
Update fix explanations for Broker fix integration scan
  • Loading branch information
JeffreyHuynh1 authored Sep 19, 2023
1 parent ced9628 commit 1790ef3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
23 changes: 19 additions & 4 deletions src/cmd/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,24 @@ pub enum Error {
},
}

#[cfg(target_family = "windows")]
fn fossa_path_command() -> &'static str {
"where.exe fossa"
}

#[cfg(target_family = "unix")]
fn fossa_path_command() -> &'static str {
"which fossa"
}

#[cfg(target_family = "windows")]
fn cli_command() -> &'static str {
"PATH ; fossa.exe analyze -o"
r#"$env:PATH="" ; <INSERT YOUR FOSSA PATH> analyze -o"#
}

#[cfg(target_family = "unix")]
fn cli_command() -> &'static str {
r#"PATH="" fossa analyze -o"#
r#"PATH="" <NSERT YOUR FOSSA PATH> analyze -o"#
}

impl Error {
Expand Down Expand Up @@ -263,6 +273,7 @@ impl Error {

fn integration_scan_error(remote: &Remote, branch: &String) -> Self {
let cli_command = cli_command().green();
let fossa_path_command = fossa_path_command().green();
let git_command = format!("git clone -b {} {}", branch, remote).green();

let msg = formatdoc!(
Expand All @@ -271,8 +282,12 @@ impl Error {
To view the error, you must first download the failing integration. You can download the integration by using the following command:
{git_command}
Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:
Next, use the following command to locate the path of the fossa-cli:
{fossa_path_command}
Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:
{cli_command}"
);
Expand Down
1 change: 0 additions & 1 deletion src/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ struct ScanGitVCSReference {
}

impl ScanGitVCSReference {
/// Instantiate ScanGitVCSReference instance
fn new(integration: &Integration, reference: &Reference) -> Self {
Self {
scan_id: Uuid::new_v4().to_string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ Broker encountered an error while scanning your git remote at 'https://github.co
To view the error, you must first download the failing integration. You can download the integration by using the following command:

git clone -b master https://github.com/fossas/empty.git

Next, use the following command to locate the path of the fossa-cli:

which fossa

Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:

Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:

PATH="" fossa analyze -o
PATH="" <NSERT YOUR FOSSA PATH> analyze -o

Errors found while checking connection to FOSSA

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ Broker encountered an error while scanning your git remote at 'https://github.co
To view the error, you must first download the failing integration. You can download the integration by using the following command:

git clone -b master https://github.com/fossas/empty.git

Next, use the following command to locate the path of the fossa-cli:

where.exe fossa

Once the download is complete, you can debug the issue by running the following command in the directory of your downloaded integration:

Once the download is complete, you can debug the issue by running the following command in directory of your downloaded integration:

PATH ; fossa.exe analyze -o
$env:PATH="" ; <INSERT YOUR FOSSA PATH> analyze -o

Errors found while checking connection to FOSSA

Expand Down

0 comments on commit 1790ef3

Please sign in to comment.