]> gitweb.factorcode.org Git - factor.git/commitdiff
io.launcher: use process-contents in a few places
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 19 Sep 2023 16:26:35 +0000 (09:26 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 19 Sep 2023 16:26:35 +0000 (09:26 -0700)
extra/backticks/backticks.factor
extra/git/git-tests.factor
extra/shell/shell.factor
extra/zealot/factor/factor.factor

index 9fe62b62e98ad246055d85ff4f4554a6416a20b8..671e2b0d51898eabd9114382875ccc4b6eb87c5c 100644 (file)
@@ -1,11 +1,9 @@
 ! Copyright (C) 2015 John Benediktsson
 ! See https://factorcode.org/license.txt for BSD license
-USING: fry io io.encodings.utf8 interpolate io.launcher
-multiline sequences ;
+USING: interpolate io.launcher multiline sequences ;
 IN: backticks
 
 SYNTAX: `
     "`" parse-multiline-string '[
-        _ interpolate>string
-        utf8 [ read-contents ] with-process-reader
+        _ interpolate>string process-contents
     ] append! ;
index 89870378d76030e0bb4a472beebccf7de23b6ced..a09ccf18f3d829c5d0488cf256185cabc9520e5c 100644 (file)
@@ -1,12 +1,9 @@
 ! Copyright (C) 2015 Doug Coleman.
 ! See https://factorcode.org/license.txt for BSD license.
-USING: accessors fry git io io.directories io.encodings.utf8
-io.launcher io.streams.string kernel sequences tools.test ;
+USING: accessors git io io.directories io.launcher
+io.streams.string kernel sequences tools.test ;
 IN: git.tests
 
-: run-process-stdout ( process -- string )
-    >process utf8 [ read-contents ] with-process-reader ;
-
 : with-empty-test-git-repo ( quot -- )
     '[
         { "git" "init" } run-process drop
@@ -36,7 +33,7 @@ IN: git.tests
 
 { } [
     [
-        { "git" "log" } run-process-stdout print
+        { "git" "log" } process-contents print
     ] with-zero-byte-file-repo
 ] unit-test
 
index d4bb109966cc0071cc773e16ef4773b4c05136ee..5248938a0ef6b339b2c9d5cfca6550ab4bf3fd2b 100644 (file)
@@ -29,8 +29,7 @@ M: factor-expr expand expr>> eval>string ;
 DEFER: expansion
 
 M: back-quoted-expr expand
-  expr>> expr command>> expansion
-  utf8 [ read-contents ] with-process-reader
+  expr>> expr command>> expansion process-contents
   " \n" split harvest ;
 
 : expansion ( command -- command ) [ expand ] map flatten ;
index 4c7ccb2b67aeb51f029f27485cf4349564265dd7..bd13fc93dcfb6255965951f2b6fcabaff24ff59a 100644 (file)
@@ -206,7 +206,7 @@ M: windows factor-path "./factor.com" ;
 : check-new-factor ( path branch/checksum cmd -- out )
     nip [ factor-path "-i=factor.image" ] dip "-e=%s" sprintf 3array
     "./test-bisect-log" zealot-test-command
-    '[ _ utf8 [ read-contents ] with-process-reader ] with-directory ;
+    '[ _ process-contents ] with-directory ;
 
 : build-new-factor ( branch/checksum -- )
     checkout-new-factor bootstrap-new-factor test-new-factor ;