New Fossil class using GtSubProcessInMemory.
This commit is contained in:
parent
6af649e3b5
commit
8ad6c73f45
16
repository/Fossil/Fossil.class.st
Normal file
16
repository/Fossil/Fossil.class.st
Normal 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
|
||||||
|
|
||||||
|
]
|
@ -48,13 +48,11 @@ FossilRepo class >> local: aFilePath repository: aFossilFilePath [
|
|||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
FossilRepo class >> locateExecutable [
|
FossilRepo class >> locateExecutable [
|
||||||
Smalltalk os isWindows ifTrue: [ ^ self ].
|
Smalltalk os isWindows ifTrue: [ ^ MiniDocs shouldBeImplemented ].
|
||||||
OSSUnixSubprocess new
|
^ (GtSubprocessWithInMemoryOutput new
|
||||||
command: 'which';
|
shellCommand: 'which fossil';
|
||||||
arguments: #('fossil') ;
|
runAndWait;
|
||||||
redirectStdout;
|
stdout) lines first
|
||||||
runAndWaitOnExitDo: [ :process :outString |
|
|
||||||
^ outString allButLast ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #operation }
|
{ #category : #operation }
|
||||||
|
Loading…
Reference in New Issue
Block a user