mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
fix: which should use cwd if given a relative filepath (#9761)
* Revert "fix!: do not lookup cwd in which (#9691)"
This reverts commit 4869ebff24.
* fix which implementation to be more accurate
* t
* which tests windows
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6295,5 +6295,12 @@ pub fn withoutSuffixComptime(input: []const u8, comptime suffix: []const u8) []c
|
||||
return input;
|
||||
}
|
||||
|
||||
pub fn withoutPrefixComptime(input: []const u8, comptime prefix: []const u8) []const u8 {
|
||||
if (hasPrefixComptime(input, prefix)) {
|
||||
return input[prefix.len..];
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
// extern "C" bool icu_hasBinaryProperty(UChar32 cp, unsigned int prop)
|
||||
extern fn icu_hasBinaryProperty(c: u32, which: c_uint) bool;
|
||||
|
||||
Reference in New Issue
Block a user