mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-30 22:23:44 +02:00
printer: make compilation on non-unix, non-windows platforms work
Some of the new hyperlink work caused ripgrep to stop compiling on non-{Unix,Windows} platforms. The most popular of which is WASI. This commit makes non-{Unix,Windows} compile again. And we add a very basic WASI test in CI to catch regressions. More work is needed to make tests on non-{Unix,Windows} platforms work. And of course, this commit specifically takes the path of disabling hyperlink support for non-{Unix,Windows} platforms.
This commit is contained in:
committed by
GitHub
parent
02b47b7469
commit
bb8601b2ba
@ -811,6 +811,13 @@ impl HyperlinkPath {
|
||||
Some(HyperlinkPath::encode(with_slash.as_bytes()))
|
||||
}
|
||||
|
||||
/// For other platforms (not windows, not unix), return None and log a debug message.
|
||||
#[cfg(not(any(windows, unix)))]
|
||||
pub(crate) fn from_path(original_path: &Path) -> Option<HyperlinkPath> {
|
||||
log::debug!("hyperlinks are not supported on this platform");
|
||||
None
|
||||
}
|
||||
|
||||
/// Percent-encodes a path.
|
||||
///
|
||||
/// The alphanumeric ASCII characters and "-", ".", "_", "~" are unreserved
|
||||
|
Reference in New Issue
Block a user