mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
test: go into '[' mode when executable ends with [
This makes [ work even when installed with a custom prefix, e.g. as uu-[.
This commit is contained in:
parent
97d14893a1
commit
cd83aed89c
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 {
|
|||
let mut args: Vec<_> = args.collect();
|
||||
|
||||
// If invoked via name '[', matching ']' must be in the last arg
|
||||
if binary_name == "[" {
|
||||
if binary_name.ends_with('[') {
|
||||
let last = args.pop();
|
||||
if last != Some(OsString::from("]")) {
|
||||
eprintln!("[: missing ']'");
|
||||
|
|
Loading…
Reference in a new issue