Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid using non-existant cfg to not trigger lint #97

Merged
merged 3 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion examples/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn test(sh: &Shell) -> Result<()> {
// running this, we've already compiled a bunch of stuff. Originally we tried to `rm -rf
// .target`, but we also observed weird SIGKILL: 9 errors on mac. Perhaps its our self-removal?
// Let's scope it only to linux (windows won't work, bc one can not remove oneself there).
if cfg!(linux) {
if cfg!(unix) {
sh.remove_path("./target")?;
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ pub use xshell_macros::__cmd;
#[macro_export]
macro_rules! cmd {
($sh:expr, $cmd:literal) => {{
#[cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)]
#[cfg(any())] // Trick rust analyzer into highlighting interpolated bits
format_args!($cmd);
let f = |prog| $sh.cmd(prog);
let cmd: $crate::Cmd = $crate::__cmd!(f $cmd);
Expand Down
Loading