New Fossil class using GtSubProcessInMemory.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-09-09 19:43:02 -05:00
parent 6af649e3b5
commit 8ad6c73f45
2 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,16 @@
Class {
#name : #Fossil,
#superclass : #Object,
#category : #Fossil
}
{ #category : #accessing }
Fossil class >> all: subcommand [
Smalltalk os isWindows ifTrue: [ ^ self shouldBeImplemented ].
^ GtSubprocessWithInMemoryOutput new
shellCommand: 'fossil all ', subcommand;
runAndWait;
stdout
]

View File

@ -48,13 +48,11 @@ FossilRepo class >> local: aFilePath repository: aFossilFilePath [
{ #category : #accessing }
FossilRepo class >> locateExecutable [
Smalltalk os isWindows ifTrue: [ ^ self ].
OSSUnixSubprocess new
command: 'which';
arguments: #('fossil') ;
redirectStdout;
runAndWaitOnExitDo: [ :process :outString |
^ outString allButLast ]
Smalltalk os isWindows ifTrue: [ ^ MiniDocs shouldBeImplemented ].
^ (GtSubprocessWithInMemoryOutput new
shellCommand: 'which fossil';
runAndWait;
stdout) lines first
]
{ #category : #operation }