File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ private static class TrueExe {
696696        public  static  String  path () { return  path ; }
697697        private  static  final  String  path  = path0 ();
698698        private  static  String  path0 (){
699-             if  (!Platform . isBusybox ( "/bin/true" )) {
699+             if  (!Files . isSymbolicLink ( Paths . get ( "/bin/true" ) )) {
700700                return  "/bin/true" ;
701701            } else  {
702702                File  trueExe  = new  File ("true" );
@@ -711,7 +711,7 @@ private static class FalseExe {
711711        public  static  String  path () { return  path ; }
712712        private  static  final  String  path  = path0 ();
713713        private  static  String  path0 (){
714-             if  (!Platform . isBusybox ( "/bin/false" )) {
714+             if  (!Files . isSymbolicLink ( Paths . get ( "/bin/false" ) )) {
715715                return  "/bin/false" ;
716716            } else  {
717717                File  falseExe  = new  File ("false" );
Original file line number Diff line number Diff line change 11/* 
2-  * Copyright (c) 2014, 2023 , Oracle and/or its affiliates. All rights reserved. 
2+  * Copyright (c) 2014, 2025 , Oracle and/or its affiliates. All rights reserved. 
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 
44 * 
55 * This code is free software; you can redistribute it and/or modify it 
@@ -295,10 +295,12 @@ public static void test3() {
295295                    String  expected  = "sleep" ;
296296                    if  (Platform .isWindows ()) {
297297                        expected  = "sleep.exe" ;
298-                     } else  if  (Platform .isBusybox ("/bin/sleep" )) {
299-                         // With busybox sleep is just a sym link to busybox. 
300-                         // The busbox executable is seen as ProcessHandle.Info command. 
301-                         expected  = "busybox" ;
298+                     } else  if  (Files .isSymbolicLink (Paths .get ("/bin/sleep" ))) {
299+                         // Busybox sleep is a symbolic link to /bin/busybox. 
300+                         // Rust coreutils sleep is a symbolic link to coreutils 
301+                         // The busbox/coreutils executables are seen as ProcessHandle.Info command. 
302+                         Path  executable  = Files .readSymbolicLink (Paths .get ("/bin/sleep" ));
303+                         expected  = executable .getFileName ().toString ();
302304                    }
303305                    Assert .assertTrue (command .endsWith (expected ), "Command: expected: \' "  +
304306                            expected  + "\' , actual: "  + command );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments