Skip to content

Commit 5a7958d

Browse files
authored
Fix aqua CLI and JetBrains Aqua conflict (#1092)
1 parent 481a942 commit 5a7958d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/steps/generic.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,13 @@ pub fn run_apm(ctx: &ExecutionContext) -> Result<()> {
226226
pub fn run_aqua(ctx: &ExecutionContext) -> Result<()> {
227227
let aqua = require("aqua")?;
228228

229+
// Check if `aqua --help` mentions "aqua". JetBrains aqua does not, aqua CLI does.
230+
let output = ctx.run_type().execute(&aqua).arg("--help").output_checked()?;
231+
232+
if !String::from_utf8(output.stdout)?.contains("aqua") {
233+
return Err(SkipStep("Command aqua probably points to JetBrains Aqua".to_string()).into());
234+
}
235+
229236
print_separator("Aqua");
230237
if ctx.run_type().dry() {
231238
println!("{}", t!("Updating aqua ..."));

0 commit comments

Comments
 (0)