From 22402a2e07d588fe784f35e9fa32f17227b04469 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 1 Jun 2015 14:59:36 -0700 Subject: [PATCH] Revert "io.standard-paths: adding support for PATHEXT." This reverts commit be9bff0e5bc77e3998bfc92257dcee9d8ee5728b. --- .../io/standard-paths/windows/windows.factor | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/basis/io/standard-paths/windows/windows.factor b/basis/io/standard-paths/windows/windows.factor index 4911bb3b36..d82bcdbd6a 100644 --- a/basis/io/standard-paths/windows/windows.factor +++ b/basis/io/standard-paths/windows/windows.factor @@ -1,25 +1,14 @@ ! Copyright (C) 2011 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays assocs environment fry -io.directories.search.windows io.files io.pathnames -io.standard-paths kernel sequences splitting system -unicode.case ; +USING: environment fry io.directories.search.windows io.files +io.pathnames io.standard-paths kernel sequences splitting +system unicode.case ; IN: io.standard-paths.windows M: windows find-in-applications '[ [ >lower _ tail? ] find-in-program-files ] map-find drop ; -: path ( -- path ) - "PATH" os-env ";" split "." prefix ; - -: path-extensions ( command -- commands ) - "PATHEXT" os-env [ - ";" split 2dup [ [ >lower ] bi@ tail? ] with any? - [ drop 1array ] [ [ append ] with map ] if - ] [ 1array ] if* ; - M: windows find-in-path* - path-extensions path - cartesian-product flip concat - [ prepend-path ] { } assoc>map - [ exists? ] find nip ; + [ "PATH" os-env ";" split ] dip + '[ _ append-path exists? ] find nip ; +