Skip to content

Conversation

@Prajwal-k-tech
Copy link

@Prajwal-k-tech Prajwal-k-tech commented Oct 22, 2025

Fixes #1334 Support for Adless (Not yet tested)

Requires someone with adless to test it

@Prajwal-k-tech
Copy link
Author

Note, I've also banned Command::new() which was part of issue 1227 and I am continuing work on it

@GideonBear
Copy link
Member

Note, I've also banned Command::new() which was part of issue 1227 and I am continuing work on it

Please don't mix PRs. Can you separate them?

Also please don't run cargo update. That is what is causing the errors in CI.

- Add new adless step module with sudo execution
- Integrate adless into Step enum and default steps
- Support Windows, Linux, and macOS platforms

Closes topgrade-rs#1334
@GideonBear GideonBear changed the title Adles feat(adles): add adles step Oct 27, 2025
@GideonBear GideonBear changed the title feat(adles): add adles step feat(adless): add adless step Oct 27, 2025
@GideonBear
Copy link
Member

Make sure to put the issue tag directly after the keyword (fixes), otherwise GitHub won't recognize it

#[cfg(target_os = "linux")]
runner.execute(*self, "toolbx", || toolbx::run_toolbx(ctx))?
}
Typst => runner.execute(*self, "Typst", || generic::run_typst(ctx))?,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad rebase

Comment on lines +1 to +15
use crate::command::CommandExt;
use crate::execution_context::ExecutionContext;
use crate::terminal::print_separator;
use crate::utils::require;
use color_eyre::eyre::Result;

/// Update Adless hosts list using `sudo adless update`
pub fn run_adless(ctx: &ExecutionContext) -> Result<()> {
let adless = require("adless")?;

print_separator("Adless");

let sudo = ctx.require_sudo()?;
sudo.execute(ctx, &adless)?.arg("update").status_checked()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of putting adless in it's own file (steps/adless.rs), put it into the file matching its OS. For this one, that's os/unix.rs.

#[cfg(target_os = "linux")]
runner.execute(*self, "am", || linux::run_am(ctx))?
}
Adless => runner.execute(*self, "adless", || adless::run_adless(ctx))?,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to add cfg(unix) here; see also Tmux for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Adless

2 participants