It works for me 
    
    
    import os, strutils
    
    for param in commandLineParams():
      for path in getEnv("PATH").split PathSep:
        let probe = path / param
        if existsFile probe:
          echo probe # keeps printing forever
          break
    
    
    Run

Reply via email to